Commit Graph

15656 Commits (31452420ca956f2cf37f705c869e265c33894f07)

Author SHA1 Message Date
Gábor Stefanik 68ec53292c b43: Fix and update LP-PHY code
-Fix a few nasty typos (b43_phy_* operations instead of b43_radio_*)
 in the channel tune routines.
-Fix some typos & spec errors found by MMIO tracing.
-Optimize b43_phy_write & b43_phy_mask/set/maskset to use
 only the minimal number of MMIO accesses. (Write is possible
 using a single 32-bit MMIO write, while set/mask/maskset can
 be done in 3 16-bit MMIOs).
-Set the default channel back to 1, as the bug forcing us to use
 channel 7 is now fixed.

With this, the device comes up, scans, associates, transmits,
receives, monitors and injects on all channels - in other words,
it's fully functional. Sensitivity and TX power are still sub-optimal,
due to the lack of calibration (that's next on my list).

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:52 -04:00
Gábor Stefanik d8fa338ee0 b43: LP-PHY: Fix and simplify Qdiv roundup
The Qdiv roundup routine is essentially a fixed-point
division algorithm, using only integer math.
However, the version in the specs had a major error
that has been recently fixed (a missing quotient++).

Replace Qdiv roundup with a rewritten, simplified version.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:52 -04:00
Herton Ronaldo Krzesinski ca9152e37f rtl8187: Implement rfkill support
This change implements rfkill support for RTL8187B and RTL8187L devices,
using new cfg80211 rfkill API.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:52 -04:00
Herton Ronaldo Krzesinski 6a8171f261 rtl8187: fix circular locking (rtl8187_stop/rtl8187_work)
Larry Finger reports following lockdep warning:

[ INFO: possible circular locking dependency detected ]
2.6.31-rc6-wl #201
-------------------------------------------------------
rfkill/30578 is trying to acquire lock:
 (&(&priv->work)->work#2){+.+...}, at: [<ffffffff81051215>]
__cancel_work_timer+0xd9/0x222

but task is already holding lock:
 (&priv->conf_mutex#2){+.+.+.}, at: [<ffffffffa064a024>]
rtl8187_stop+0x31/0x364 [rtl8187]

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #1 (&priv->conf_mutex#2){+.+.+.}:
       [<ffffffff81065957>] __lock_acquire+0x12d0/0x1614
       [<ffffffff81065d54>] lock_acquire+0xb9/0xdd
       [<ffffffff8127c32f>] mutex_lock_nested+0x56/0x2a8
       [<ffffffffa064a392>] rtl8187_work+0x3b/0xf2 [rtl8187]
       [<ffffffff81050758>] worker_thread+0x1fa/0x30a
       [<ffffffff81054ca5>] kthread+0x8f/0x97
       [<ffffffff8100cb7a>] child_rip+0xa/0x20
       [<ffffffffffffffff>] 0xffffffffffffffff

-> #0 (&(&priv->work)->work#2){+.+...}:
       [<ffffffff8106568c>] __lock_acquire+0x1005/0x1614
       [<ffffffff81065d54>] lock_acquire+0xb9/0xdd
       [<ffffffff8105124e>] __cancel_work_timer+0x112/0x222
       [<ffffffff8105136b>] cancel_delayed_work_sync+0xd/0xf
       [<ffffffffa064a33f>] rtl8187_stop+0x34c/0x364 [rtl8187]
       [<ffffffffa0242866>] ieee80211_stop_device+0x29/0x61 [mac80211]
       [<ffffffffa0239194>] ieee80211_stop+0x476/0x530 [mac80211]
       [<ffffffff8120ce15>] dev_close+0x8a/0xac
       [<ffffffffa01d9fa7>] cfg80211_rfkill_set_block+0x4a/0x7a [cfg80211]
       [<ffffffffa01bf4f0>] rfkill_set_block+0x84/0xd9 [rfkill]
       [<ffffffffa01bfc31>] rfkill_fop_write+0xda/0x124 [rfkill]
       [<ffffffff810cf286>] vfs_write+0xae/0x14a
       [<ffffffff810cf3e6>] sys_write+0x47/0x6e
       [<ffffffff8100ba6b>] system_call_fastpath+0x16/0x1b
       [<ffffffffffffffff>] 0xffffffffffffffff

The problem here is that rtl8187_stop, while helding priv->conf_mutex,
runs cancel_delayed_work_sync on an workqueue that runs rtl8187_work,
which also takes priv->conf_mutex lock. Move cancel_delayed_work_sync
out of rtl8187_stop priv->conf_mutex locking region.

Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:51 -04:00
Vasanthakumar Thiagarajan 1773912bd2 ath9k: Add Bluetooth Coexistence 3-wire support
This patch adds 3-wire bluetooth coex support for AR9285.
This support can be enabled through btcoex_enable modparam.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:51 -04:00
Vasanthakumar Thiagarajan ff155a45ce ath9k: Add infrastructure for generic hw timers
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:51 -04:00
Vasanthakumar Thiagarajan 81fa16fbe0 ath9k: Remove hw capability bit meant for btcoex
We don't need a hw cap bit for btcoex anymore as btcoex scheme type
is enough to do this.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:51 -04:00
Vasanthakumar Thiagarajan 22f25d0d5e ath9k: Determine btcoex scheme type based on chip version
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:50 -04:00
Vasanthakumar Thiagarajan f14462c666 ath9k: Move btcoex related data to a separate struct
Also define macros for wlanactive and btactive (5 & 6) gpios.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:49 -04:00
Vasanthakumar Thiagarajan 42cc41edf2 ath9k: Configure btcoex register during every reset
Make sure btcoex register configured with appropriate values
after it is initialized with the default values from initvals.h
during reset.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:49 -04:00
Vasanthakumar Thiagarajan 17d50d1df4 ath9k: Move btcoex stuff from hw.[ch] to new btcoex.[ch]
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:48 -04:00
Vasanthakumar Thiagarajan f985ad12b5 ath9k: Split ath9k_hw_btcoex_enable() into two logical pieces
This function currently does initialization + enable the
btcoex support. Split it into two logical functions which
does the above operations separately. Btcoex initialization
is done during attach time and enabling this feature is done
in start(). Also, add code to disable btcoex support in stop().

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:48 -04:00
Jussi Kivilinna 4a7f13eef5 rndis_wlan: set cipher suites for cfg80211
rndis_wlan does not set cipher suites list for cfg80211 which causes
wext-compat-range to report rndis_wlan not supporting WPA. Patch adds
cipher suites list and fixes NetworkManager not being able to connect to
WPA encrypted APs.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:48 -04:00
Sujith 7cf4a2e778 ath9k: Wrap DMA dump function with PS wakeup/restore
When dumping register contents, HW has to be awake.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:48 -04:00
Sujith b264c673a0 ath9k: Update INITVALs for AR9285
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:47 -04:00
Sujith 20caf0dd41 ath9k: Handle PA cal usage properly
PA Calibration is not needed for high power solutions.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:47 -04:00
Sujith 0abb096879 ath9k: Fix bugs in programming registers during PA CAL
* First PA driver (PDPADRV1) was not powered down properly.
* Compensation capacitor for dynamic PA was programmed incorrectly.

Also, remove a stray REG_READ.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:47 -04:00
Sujith a13883b0bf ath9k: Reduce the frequency of PA offset calibration
PA calibration need not be done if the offset is not varying.
The current logic does PA calibration even if the offset is the
same.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:46 -04:00
John W. Linville b8ecd988b1 libipw: initiate cfg80211 API conversion
Initiate the conversion of libipw to the new cfg80211 configuration API.

For now, leave CONFIG_IPW2200_PROMISCUOUS stuff alone.  Eventually
migrate it to cfg80211 when the add/del/change_virtual_intf methods
are implemented.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:46 -04:00
Roel Kluin 73f57f8398 ath9k: Fix read buffer overflow
Prevent a read of powInfo[-1] in the first iteration.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:46 -04:00
Gábor Stefanik 6bd5f5208f b43: LP-PHY: Fix a few typos in the RC calibration code
The RC calibration code has some typos - fix them.
Also, make the default channel 7, as channel 1 is still
broken (only channels 7 and 8, and occasionally 9 work).

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:45 -04:00
Jaswinder Singh Rajput 1e4c7ddc3c PRISM54: fix compilation warning
CC [M]  drivers/net/wireless/prism54/islpci_eth.o
drivers/net/wireless/prism54/islpci_eth.c: In function ‘islpci_eth_cleanup_transmit’:
drivers/net/wireless/prism54/islpci_eth.c:53: warning: cast from pointer to integer of different size
drivers/net/wireless/prism54/islpci_eth.c: In function ‘islpci_eth_receive’:
drivers/net/wireless/prism54/islpci_eth.c:453: warning: cast from pointer to integer of different size

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:44 -04:00
Bob Copeland 1c81874078 ath5k: add hardware CCMP encyption support
Recent ath5k hardware is capable of doing CCMP acceleration.
Enable it for the cards that support it.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:44 -04:00
Bob Copeland 1c5256bb16 ath5k: use the skb->cb directly for RX status
Save a memcpy by just storing updates directly in the skb
control block.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:44 -04:00
Marcos Chaparro 09c9bae26b ath5k: add led pin configuration for compaq c700 laptop
With this patch, a compaq c700 can turn on the wifi led.
The array of compatible devices now includes the hardware
present in this computer, as well as the led pin and
polarity.

Signed-off-by: Marcos Chaparro <nitrousnrg@gmail.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:43 -04:00
Bob Copeland 56d1de0a21 ath5k: clean up filter flags setting
The maze of if() statements in configure_filter is confusing.
Reorganizing it as a switch statement makes it more apparent what
is going on and reveals several suspicious settings.  This has no
functional changes, though it does remove some redundant flags
that are set earlier.

Also now that we can sleep, protect sc->filter_flags with the
sc lock.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:43 -04:00
Lennert Buytenhek 2aa7b01fe4 mwl8k: separate driver and device info reporting during probe
Only print the driver version once, and condense all per-PHY
information to a single line.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:42 -04:00
Lennert Buytenhek 76c962a204 mwl8k: missing endian conversion when printing firmware command result
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:42 -04:00
Lennert Buytenhek 39a1e42eb4 mwl8k: fix pci dma mapping leak in mwl8k_post_cmd() error path
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:42 -04:00
Lennert Buytenhek 942457d63f mwl8k: fix inverted error test in mwl8k_bss_info_changed()
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:42 -04:00
Joerg Albert 229a7ef7c2 ar9170: remove unnecessary call to ar9170_set_beacon_timers
Signed-off-by: Joerg Albert <jal2@gmx.de>
Acked-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:41 -04:00
Joerg Albert ea39d1a402 ar9170: cleanup of bss_info_changed and beacon config
Add beacon control by BSS_CHANGED_BEACON_ENABLED and
bss_conf->enable_beacon from mac80211.

Signed-off-by: Joerg Albert <jal2@gmx.de>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:41 -04:00
Reinette Chatre c1eb2c82e5 ipw2x00: update contact information
Intel Linux wireless folks can be reached via this address.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:40 -04:00
Wey-Yi Guy 5bddf54962 iwlwifi: fix unloading driver while scanning
If NetworkManager is busy scanning when user
tries to unload the module, the driver can not be unloaded
because HW still scanning.

Make sure driver sends abort scan host command to uCode if it
is in the middle of scanning during driver unload.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:39 -04:00
Abhijeet Kolekar b2ccb4dbe7 iwlwifi: fix remove key error
Fix following error by sending synchronous command and waiting for the command
to complete.

mac80211-phy0: failed to remove key (0, ff:ff:ff:ff:ff:ff) from hardware (-16).

-16 is EBUSY error. The asynchronous command tests for STATUS_EXIT_PENDING
while interface is getting down and it returns -EBUSY error if set.
Changing the host command from asynchronous call to synchronous call
enables command to be run while interface is going down.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:39 -04:00
Wey-Yi Guy ab9fd1bf76 iwlwifi: read enhanced tx power info from EEPROM image
For 6000 series and up, additional enhanced regulatory tx power
limitation information is added to EEPROM image.

In order to setup the tx power limitation per channel correctly. Read
the enhanced tx power information from EEPROM image and update
accordingly.

The information is provided per SISO (a,b,c) chain based, it also has
information for both MIMO2 and MIMO3. For tx power regulatory
limitation, take the highest number from all the chains and update.
Also update tx_power_user_lmt to the highest power supported by any
channels and chains

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:39 -04:00
Wey-Yi Guy c4d9b50986 iwlwifi: remove duplicated define
Remove duplicated define "STA_FLG_PWR_SAVE_MSK"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:38 -04:00
Daniel C Halperin c5f8cdb72e iwlwifi: set HT flags in ieee80211_rx_status for received packets
Add code to set the HT flags (HT, 40 MHz, Short guard interval) in
the ieee80211_rx_status field passed to mac80211.  This ensures that mac80211
processes these HT packets correctly.

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:38 -04:00
Daniel C Halperin 7ebaeff8ae iwlwifi: clear rate control flags on non-HT packet
Clear the flags (most importantly, the IEEE80211_TX_RC_MCS flag)
when sending a non-HT packet so that the rate index can be properly treated.
This fixes the reporting of legacy rates in wireless-extensions for packets
sent after an HT packet.

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:38 -04:00
Wey-Yi Guy f204b2487e iwlwifi: show current tx power
debugFs file show current tx power for all the transmit chains

Adding "tx_power" file in /sys/kernal/debug/ieee80211/phy0/iwlagn/debug
to display current tx power for all the active chains in 1/2 dB step.

Show tx power information "Not available" if uCode can not provide the
information or interface is down.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:37 -04:00
Wey-Yi Guy fcbaf8b06d iwlwifi: change IWL6000_UCODE_API_MAX to v4
uCode version changed to v4 for 6000 series

The additional parameter added to v4 is providing current tx power for
each chain in tx statistics portion of "statistics notification"
command.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:37 -04:00
Wey-Yi Guy 5eadd94bd4 iwlwifi: error checking for setting tx_power in sysfs
Perform error checking and report failure when setting tx power from
sysfs.
If fail to set the tx power, do not update the local copy, so user will
not see the incorrect tx power in sysfs

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:37 -04:00
Wey-Yi Guy dc1b097332 iwlwifi: name changes from "tx_power_channel_lmt" to "tx_power_device_lmt"
Changing the name from "tx_power_channel_lmt" to "tx_power_device_lmt";
to give idea that scope of limit is for overall device, not any
individual channels

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:37 -04:00
Wey-Yi Guy 08f2d58d0e iwlwifi: do not allow set tx power over channel power limit
When setting tx power in sysfs, check against max channel tx power
limit instead of IWL_TX_POWER_TARGET_POWER_MAX.

Different devices have different max tx power limit; using
IWL_TX_POWER_TARGET_POWER_MAX can excess the limitaion and give wrong
information.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:36 -04:00
Wey-Yi Guy 02eec9c5a1 iwlwifi: set default tx power user limit to minimal
Set the tx_power_user_lmt to the lowest power level
this value will get overwritten by channel's max power avg
from eeprom

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:36 -04:00
Gábor Stefanik aa065263ec iwlwifi: Make injection of non-broadcast frames work again
Commit 1ccb84d87d04df3c76cd4352fe69786d8c7cf016 by Wey-Yi Guy
("iwlwifi: clean up unused NL80211_IFTYPE_MONITOR for Monitor mode")
broke injection of non-broadcast frames to unassociated stations
(causing a SYSASSERT for all such injected frames), due to injected
frames no longer automatically getting a broadcast station ID assigned.
This patch restores the old behavior, fixing the aforementioned
regression.

Also, consistently check for IEEE80211_TX_CTL_INJECTED instead of
iwl_is_monitor_mode in the TX path, as TX_CTL_INJECTED specifically
means that a given packet is coming from a monitor interface, while
iwl_is_monitor_mode only shows whether a monitor interface exists
on the device.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:36 -04:00
Marek Vasut 9d45368a38 libertas: Add support for Marvell Libertas CF8305
The CF8305 is a very old silicon running firmware version 3.0 . This card also
needs some special treatment as it's so old it can't do unaligned register
access. But since that happens only at one place, there were no changes made to
the register access functions, but instead that particular place was fixed.
Also, this card uses only one-stage firmware which is loaded the same way as
helper firmware. The second-stage firmware isn't loaded on this card and doesn't
therefore have to be supplied.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:35 -04:00
Dan Williams ca4fe30097 libertas: clean up and clarify get_common_rates
Clarify what the heck the function is doing with better variable names
and less indirection and better comments.  Also ensure callers use the
proper minimum size, even though all rates arrays should be size
MAX_RATES anyway.  Reverts part of Andrey's dynamic alloc patch since we
don't really need it.  Also leaves the passed-in rates array alone on
errors.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:35 -04:00
Roel Kluin 1e3d31c589 libertas: Read buffer overflow
Check whether index is within bounds before testing the element.

(also includes "Libertas: Association request to the driver failed"

The size of the tmp buffer was too small, causing a regression

rates->rates has an arraysize of 1, so a memcpy with
MAX_RATES (14) was already causing reads out of bounds.

In get_common_rates() the memset/memcpy can be moved upwards. -- JWL)

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Tested-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:35 -04:00
Sujith 3d832611d7 ath9k: Fix chainmask selection during scanning
The TX/RX chainmasks were set to 1x1 during scanning.
Configure them properly with the values retrieved from
the EEPROM.

Also, this requires scan_start/scan_end callbacks to be
locked with sc->mutex.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:30 -04:00
John W. Linville b0a4e7d8a2 libipw: switch from ieee80211_* to libipw_* naming policy
This eliminates the dual definition of ieee80211_channel (and possibly
others), further clarifying who defines what and paving the way for
inclusion of cfg80211.h.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:28 -04:00
Jussi Kivilinna 40ba60ddfe rndis_wlan: fix broken logic in add_wep_key()
add_wep_key() tries to check if key length is not 5 AND not 13
but uses (key_len != 5 || key_len != 13) instead. Fix this.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:25 -04:00
Javier Cardona 5eb6ba83aa ath9k: Add support FIF_OTHER_BSS filtering mode.
Support for FIF_OTHER_BSS was missing.  This patch adds support for this
filtering mode which in turn resolves a problem where mesh interfaces would not
receive broadcast traffic.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:24 -04:00
Christian Lamparter 90d6f92828 p54: fix broadcast buffering in AP mode
The patch "mac80211: fix PS-poll response race" somehow broke
broadcast buffering in a funny way.

During normal operation - stations are awake - the firmware refused
to transmit broadcast frames and reported P54_TX_PSM_CANCELLED.
But everything worked as soon as one station entered PSM.

The reason:
The stack sets IEEE80211_TX_CTL_SEND_AFTER_DTIM for outgoing
broadcast frames as soon as a station is marked as sleeping.
This flag triggers a path which will reroute these frames
into p54's "content after beacon" queue, which is designed
to cope with the demands for psm.

This patch restores the old behavior.

IEEE80211_TX_CTL_CLEAR_PS_FILT will once again be used to signalize
the firmware to ignore the ps canceling for certain frames.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:23 -04:00
Ben Hutchings 5c8af3b9aa sfc: Improve reliability of RX queue flushing
Reconfiguring the port requires us to flush all DMA queues.  In
repeated testing we have found that RX flushes would sometimes fail
because the RX DMA engine was not properly isolated from the MACs.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 17:38:59 -07:00
Ben Hutchings cc11763b35 sfc: Work around XMAC bug causing packet loss with some peers
Received frames must be re-clocked by the local XGXS to the 156.25 MHz
(DDR) clock of the XGMII.  If the remote clock is slightly faster this
can reduce a minimum IPG of 64 bit-times (1 cycle) to 32 bit-times
(half a cycle).  If the XMAC detects that a frame has reached the
maximum RX frame length in the same cycle that it receives one of
these reduced IPGs, it may miss the IPG, causing two valid frames to
be treated as a single invalid frame (over-length with bad CRC).

We work around this by increasing the maximum RX frame length so that
peers with matched MTU will not provoke this bug.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 17:38:56 -07:00
Ben Hutchings 5afaa753d6 sfc: QT2025C: Use hard reset only
At probe time, falcon_reset_hw() performs a hard reset of the PHY
along with Falcon.  There is no need to perform a soft reset later,
and any access to standard MDIO registers before the PHY firmware has
booted can interrupt the boot process, making the port unusable.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 17:38:54 -07:00
Ben Hutchings 771046d7b1 mdio: Check MDIO_STAT1_FAULT in mdio45_links_ok()
Some PHYs will report that the link is up even though there is a fault
condition.  Therefore, check the fault flag too.  We must also read
STAT2 to reset this flag.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 17:38:53 -07:00
Ben Hutchings d4ec09acdb sfc: Do not reinitialise XAUI serdes before it has completed reset
falcon_reset_xaui() waits for XGXS reset to complete, but the XAUI
serdes reset may take longer.  It needs to check both reset active
bits.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 17:38:51 -07:00
Ben Hutchings aed0628dae sfc: Fix ordering of device registration and initial netif_carrier_off()
We must call netif_carrier_off() after the device is registered, not
before, to set the operational state and user-space IFF_RUNNING flag
correctly.

Since we don't want observers to see an intermediate state, open-code
register_netdev() and add efx_update_name() and netif_carrier_off()
into the locked region.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 17:38:49 -07:00
Matt Carlson f656f39801 tg3: Update version to 3.100
This patch updates the tg3 version to 3.100.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:48:08 -07:00
Matt Carlson d9221e6600 broadcom: Make the 57780 IEEE compliant
This brings the 57780's phy into IEEE compliance by suppressing the
common mode oscillation.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:48:06 -07:00
Matt Carlson d7a2ed9248 broadcom: Add AC131 phy support
This patch adds support for the AC131 fast ethernet transceiver.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:48:05 -07:00
Matt Carlson 4f4598fd0a broadcom: Add BCM50610M support
This patch adds support for the BCM50610M phy ID.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:48:03 -07:00
Matt Carlson 7f97a4bd47 tg3: Convert code to use PHY_IS_FET
This patch converts the code to use the PHY_IS_FET flag rather than the
ASIC revision to decide whether or not to use FET paths.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:48:00 -07:00
Matt Carlson 535ef6e112 tg3: Create MII_TG3_FET namespace
Broadcom's phys come in two distinctly different register layouts.  For
the lack of an official term to distinguish between the two formats, we
can loosely categorize them by their fast ethernet or gigabit ethernet
transceiver description.  This patch creates the (driver-internal) Fast
Ethernet Transceiver (FET) namespace and converts the 5906 EPHY
definitions over.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:47:58 -07:00
Matt Carlson bb85fbb6a9 tg3: Tune 5785 clock switching
This patch tunes the timeouts the CPMU uses to decide when to switch
from the clocks output by the PHY to internal clock sources.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:47:56 -07:00
Matt Carlson 5e7ccf2003 tg3: Add 57788, remove 57720
This patch adds support for the 57788 and removes support for the 57720
which was never released.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:47:53 -07:00
Matt Carlson e712699734 tg3: Preserve PCIe MPS setting for new devs
Most older tg3 devices only supported a PCIe maximum payload size of
128 bytes.  More recent devices bump this limit up to 256 bytes
though.  This patch modifies the code so that the MPS limit is only
enforced on those devices that only allow the 128 byte setting.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:47:53 -07:00
Matt Carlson 29ea095fb7 tg3: Fix TSO test against wrong flags var
Julia Lawall discovered that the TG3_FLG2_TSO_CAPABLE flag was being
compared against the wrong flags device member.  This patch implements
the fix.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:47:51 -07:00
Matt Carlson 255ca311b6 tg3: Prevent tx BD corruption
This patch prevents a tx BD corruption bug by preventing the device from
powering down the PLL from L1 if the link speed is 10Mbps or 100Mbps.

The same bits are also used to prevent a system hang during chip reset
resulting from a complicated set of events that ultimately leads to
PCIe block register corruption.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:47:47 -07:00
Matt Carlson 521e6b90dd tg3: Fix 57780 asic rev PCIe link receiver errors
This patch fixes some PCIe link receiver errors by decreasing the internal
electrical idle timeout.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:47:45 -07:00
Graham, David c46b59b241 e1000: Remove unused function e1000_mta_set.
Remove function e1000_mta_set, as it is no longer called

Signed-off-by: Dave Graham <david.graham@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:36:51 -07:00
Alexander Duyck cd1da50384 igb/ixgbe: add IPV6_CSUM support to vlan_features
We were already exporting TSO6 to the vlan, but we weren't exporting the
checksum support for IPV6 which was causing warning messages to be
displayed when doing IPv6 TSO over a vlan.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:36:50 -07:00
Don Skidmore 7b25cdbafd ixgbe: cleanup functions that should have been defined static
We have some ~40 functions that were being called out with 'make
namespacecheck'.  This patch changes these functions to be static.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:36:46 -07:00
Mallikarjuna R Chilakala 46a72b3514 ixgbe: Fix isues while reporting 8259x backplane link capabilities
Fix ethtool get_settings logic to report 10G & 1G advertised and
supported link modes in all 8259x 10G backplane connection types
except for 82598EB BX network connection type.

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:36:45 -07:00
Narender Kumar fa3ce355c1 netxen: bridged mode optimizations
When the interface is put in bridged mode, destination mac
addresses are unknown to firmware. So packets take a slow
path (lower priority) in firmware reducing performance.

Firmware can cache limited number of remote unicast mac
addresses for certain interval, if "dynamic mac learning"
mode is enabled.

Driver needs to enable this "mac learning" mode in firmware.
Currently this is done through net device class sysfs entry,
possibly this can also be done upon netlink notifications to
from bridge.

Signed-off-by: Narender Kumar <narender.kumar@qlogic.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:29:21 -07:00
Dhananjay Phadke 3ad4467ca4 netxen: remove netxen_nic_niu.c
Consolidate all MAC/PHY access functions into netxen_nic_hw.c

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:29:19 -07:00
Dhananjay Phadke c9517e5893 netxen: implement generic pcie semaphore functions
Implement common function for locking/unlocking 8 hardware
semaphores used for serializing access to shared resouces
on a NIC board by different PCI functions.

As by definition, callers of these semaphore API can be
put to sleep till the semaphore is locked.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:29:17 -07:00
Dhananjay Phadke cb7e4b6e37 netxen: remove unused code
Remove code for phy access on unreleased NX2031 based quad-gig board.

NX3031 based production quad-gig boards do not require direct phy
access by driver.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:29:15 -07:00
Florian Fainelli 9818f660f4 r6040: bump to version 0.25 and 20 August 2009 release date
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-23 19:16:32 -07:00
Mark Kelly e03f614af7 r6040: move down second PHY detection to r6040_init_one
Instead of fully initializing an unusable second r6040
device, perform the PHY detection earlier and bail out
in r6040_init_one when we could not read the PHY identifier.

Signed-off-by: Mark Kelly <mark@bifferos.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-23 19:16:28 -07:00
Mark Kelly d516478ff6 r6040: remove unused pioaddr variable
This patch removes the unused pioaddr variable.

Signed-off-by: Mark Kelly <mark@bifferos.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-23 19:16:26 -07:00
Dhananjay Phadke 7d6fd5e7e9 netxen: remove netxen_nic_phan_reg.h
Consolidate register definitions in netxen_nic_hdr.h

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-23 19:00:29 -07:00
Amit Kumar Salecha 22b5794b5d netxen: implement pci driver shutdown
Implement pci driver shutdown functionality, this helps
quiescing all PCI transaction before chipset is reset.

Amit Kumar Salecha <amit@qlogic.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-23 19:00:26 -07:00
Dhananjay Phadke ce644ed4db netxen: refactor tx dma mapping code
Move all tx skb mapping code into netxen_map_tx_skb().

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-23 19:00:25 -07:00
Dhananjay Phadke 1dbc84a7f6 netxen: fix firmware reset logic
If netxen_need_fw_reset() return 0 [ implies firmware is up
and running], still go through dma mask check, etc.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-23 19:00:22 -07:00
Narender Kumar 1bb482f8a4 netxen: ethtool statistics and control for LRO
Add ethtool -K knob to control LRO in firmware.
LRO path is completely separated from GRO, LRO packets
are still fed with netif_receive_skb().

Also fix ethtool statistics to include LRO packets.
Also use correct message type while configuring interrupt coalescing.

Signed-off-by: Narender Kumar <narender.kumar@qlogic.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-23 19:00:20 -07:00
Michael Chan 8fea0f0db8 bnx2: Update version to 2.0.2.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-22 17:48:55 -07:00
Michael Chan 0ced9d01d1 bnx2: Use const on flash_table structure.
The structure, once initialized, never changes.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-22 17:48:54 -07:00
Michael Chan cf7474a6f4 bnx2: Refine coalescing parameters.
- Set the USE_INT_PARAM bit so the rx-frames-irq and tx-frames-irq will take
  effect on 5709.
- Increase the default rx-frames to reduce interrupt count.
- Decrease the default rx-frames-irq and tx-frames-irq to catch more events
  during NAPI poll.

All these will reduce interrupts without affecting latency.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-22 17:48:53 -07:00
Michael Chan 790dab2f67 bnx2: Report FTQ discard counter.
Report this counter to ethtool -S and include it in netstat.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-22 17:48:49 -07:00
Michael Chan 61d9e3fa7e bnx2: Apply BROKEN_STATS workaround to 5706 and 5708.
Add flag to expand the workaround to both chips.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-22 17:48:48 -07:00
Michael Chan 6fefb65e78 bnx2: Close device if MTU change or ring size change fails.
When unable to allocate memory for new MTU or new ring size, we need
to close the device to prevent it from crashing.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-22 17:48:47 -07:00
Michael Chan 3767546cc2 bnx2: Check if_running() before touching chip registers.
Add this check to bnx2_netif_stop() and bnx2_vlan_rx_register() to
prevent bus lockups on some systems when the chip is in low power state.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-22 17:48:42 -07:00
Michael Chan 155d5561f5 bnx2: Zero out status block before chip reset.
In case IRQs are shared, we will not mistakenly start processing
the ring based on old status block indices.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-22 17:48:41 -07:00
David S. Miller f8f2109d4f Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-08-21 01:56:56 -07:00
Lennert Buytenhek a145d57583 mwl8k: update copyright and version number
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:13 -04:00
Lennert Buytenhek ab565790cb mwl8k: remove mwl8k_queue_work()
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:13 -04:00
Lennert Buytenhek e6935ea104 mwl8k: get rid of mwl8k_configure_filter() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:12 -04:00
Lennert Buytenhek 954ef509cc mwl8k: get rid of mwl8k_get_stats() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:12 -04:00
Lennert Buytenhek 3e4f542cfb mwl8k: get rid of mwl8k_conf_tx() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:11 -04:00
Lennert Buytenhek 733d3067d3 mwl8k: get rid of mwl8k_set_rts_threshold() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:10 -04:00
Lennert Buytenhek 3a980d0a50 mwl8k: get rid of mwl8k_bss_info_changed() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:09 -04:00
Lennert Buytenhek ee03a93241 mwl8k: get rid of mwl8k_config() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:09 -04:00
Lennert Buytenhek d3cea0b85a mwl8k: get rid of mwl8k_stop() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:09 -04:00
Lennert Buytenhek 2ec610cb6d mwl8k: get rid of mwl8k_start() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:08 -04:00
Lennert Buytenhek 618952a7b1 mwl8k: fix firmware command serialisation
The current mwl8k_priv->fw_lock spinlock doesn't actually protect
against multiple commands being submitted at once, as it is not kept
held over the entire firmware command submission.  And since waiting
for command completion sleeps, we can't use a spinlock anyway.

To fix mwl8k firmware command serialisation properly, we have the
following requirements:
- Some commands require that the packet transmit path is idle when
  the command is issued.  (For simplicity, we'll just quiesce the
  transmit path for every command.)
- There are certain sequences of commands that need to be issued to
  the hardware sequentially, with no other intervening commands.

This leads to an implementation of a "firmware lock" as a mutex that
can be taken recursively, and which is taken by both the low-level
command submission function (mwl8k_post_cmd) as well as any users of
that function that require issuing of an atomic sequence of commands,
and quiesces the transmit path whenever it's taken.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:08 -04:00
Lennert Buytenhek 950d5b0191 mwl8k: mwl8k_queue_work() cleanup
Delete most of the mwl8k_work_struct fields and options, since most
of them are unused or never changed from their defaults:
- We always use priv->config_wq, so delete the wqueue argument from
  mwl8k_queue_work().
- MWL8K_WQ_SPIN and MWL8K_WQ_POST_REQUEST are never used, as all
  callers sleep for request completion, so sleep unconditionally.
- MWL8K_WQ_FREE_WORKSTRUCT is never used.
- MWL8K_WQ_TX_WAIT_EMPTY is always set, so assume it unconditionally.
- timeout_ms/txwait_attempts/tx_timeout_ms are never changed from
  their defaults, so just hardcode these in the workqueue worker.
- step is never used.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:08 -04:00
Lennert Buytenhek 23b339062f mwl8k: mwl8k_txq_xmit() rework
Various mwl8k_txq_xmit changes:
- Extract the QoS field before adding the DMA header.
- Only write to tx->status once, and only after all the other
  descriptor fields have been set.
- Do all tx state manipulation under the tx spinlock.
- Remove the priv->inconfig check, as all transmit queues will
  be frozen during config cycles, so we won't ever be asked to
  transmit if a config cycle is running.
- Remove some more dead code.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:07 -04:00
Lennert Buytenhek 7595d67a06 mwl8k: implement idle mode
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:07 -04:00
Lennert Buytenhek 361c55cfad mwl8k: no need to hold ->tx_lock while setting the hardware interrupt mask
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:07 -04:00
Lennert Buytenhek c3f967d301 mwl8k: don't hardcode the number of transmit queues
Use MWL8K_TX_QUEUES instead of a hardcoded "4" in a couple of places.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:06 -04:00
Lennert Buytenhek d4b7057052 mwl8k: don't touch 'command done' interrupt during firmware load
Since firmware load commands don't generate 'command done' interrupts
like normal commands do, polling for command done interrupts just
unnecessarily slows down the firmware load process.  Removing this bit
of code speeds up loading a typical firmware image from 840 msec to
180 msec.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:06 -04:00
Lennert Buytenhek 76266b2ad3 mwl8k: dma header manipulations can't fail
Adding and removing the DMA header that the mwl8k hardware requires
on tx and provides on rx can never fail, since we are guaranteed to
have enough headroom on the tx path to expand the packet, and we only
ever shrink the packet on the rx path.  (And on both paths we are
guaranteed to be the only user of the skb we are handling.)

This allows removing all of the skb clone handling in the tx and tx
reclaim paths, and eliminates error checks in both the tx and rx
paths, simplifying the code a bit more.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:06 -04:00
Lennert Buytenhek 240e86efd6 mwl8k: ->add_interface() is not called for monitor interfaces
There is no need to check for NL80211_IFTYPE_MONITOR in
->add_interface(), as this function is never called for monitor
interfaces.  Also, there is no need to advertise this bit in our
wiphy's ->interface_modes.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:05 -04:00
Lennert Buytenhek e81cd2d664 mwl8k: fix mwl8k_configure_filter() parameter lifetime issue
mwl8k_configure_filter() passes pointers to total_flags and the
multicast address list to a workqueue function, while there is no
guarantee that those pointers will still be valid by the time the
workqueue function runs.

Solve this by passing total_flags by value, and by passing an
already built multicast address setup command packet to the workqueue
function so that we don't have to look at the multicast address list
itself outside of mwl8k_configure_filter().

Also, since ->configure_filter() can sleep now, wait synchronously
for the worker to finish.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:05 -04:00
Lennert Buytenhek 5539bb5129 mwl8k: remove MWL8K_*_SLOTTIME defines
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:05 -04:00
Lennert Buytenhek 0439b1f556 mwl8k: remove MWL8K_WMM_* defines
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:05 -04:00
Lennert Buytenhek 68ce38845c mwl8k: remove MWL8K_RADIO_*_PREAMBLE defines
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:04 -04:00
Lennert Buytenhek c46563b714 mwl8k: remove MWL8K_RADIO_* defines
Instead of passing a flag bitmask to mwl8k_cmd_802_11_radio_control,
pass the 'enable' and 'force' arguments as separate parameters, and
introduce wrappers for the common cases of enabling and disabling
without forcing.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:04 -04:00
Lennert Buytenhek ce9e2e1b84 mwl8k: various coding style cleanups
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:04 -04:00
Lennert Buytenhek ff45fc60ad mwl8k: sort firmware command list by opcode, and trim unused commands
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:04 -04:00
Lennert Buytenhek d89173f252 mwl8k: s/IEEE80211_ADDR_LEN/ETH_ALEN/g
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:03 -04:00
Lennert Buytenhek c23b5a6994 mwl8k: remove various unused struct members and defines
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:03 -04:00
Vasanthakumar Thiagarajan 22e66a4c15 ath9k: Nuke struct ath9k_node_stats
Other than ns_avgbrssi (Average beacon rssi) no data of
ath9k_node_stats is being used anywhere. Nuke this structure
and move its only useful member to ar5416Anistate. Also cleanup
this redundant data in ath_softc.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:08 -04:00
Vasanthakumar Thiagarajan ff36041652 ath9k: Fix bug in retrieving average beacon rssi
Currently the beacon rssi that LPF gives is divided and rounded
up by ATH_RSSI_EP_MULTIPLIER twice. This will leave the incorrect rssi
in ANI. Having correct rssi in ANI fixes the connection stability at
< 30dB rssi range. This patch removes the unncessary computation of average
rssi over already valid average rssi. Also removes the redundant macros to
find average rssi.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:08 -04:00
gregor kowski 035d0243eb b43: add hardware tkip
This add hardware tkip for b43.

Signed-off-by: Gregor Kowski <gregor.kowski@gmail.com>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:08 -04:00
Gábor Stefanik 5904d20676 b43: LP-PHY: Implement spec updates and remove resolved FIXMEs
Larry has started re-checking all current routines against a new
version of the Broadcom MIPS driver. This patch implements the first
round of changes he documented on the specs wiki.

Also remove a few FIXMEs regarding missing initial values for variables
with dynamic initial values where reading the values has been implemented.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:07 -04:00
David Kilroy 30fab9e0ae orinoco: remove spare whitespace
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:07 -04:00
Christian Lamparter eeef41854d ar9170: refactor configure_filter
Thanks to "mac80211: allow configure_filter callback to sleep",
we no longer have to defer the work to the workqueue.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:06 -04:00
Gábor Stefanik 5791ce18aa b43: LP-PHY: Two small spec updates
The specs are beginning to support rev3 LP-PHYs - implement one of
the changes needed for rev3 support.
Also, in the new MIPS driver, the "Japan TX filter" was renamed to
"analog TX filter init" - however, calling it "init" is confusing,
so name it "set analog filter", with a comment for easier future
identification.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:06 -04:00
Ivo van Doorn d904dc1749 rt2x00: bss_info_changed() callback is allowed to sleep
The bss_info_changed() callback function no longer needs
to be atomic. Remove the scheduled work structure and
call into the driver directly.

Additionaly this makes the DRIVER_REQUIRE_SCHEDULED
flag redundant so it can be removed.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:05 -04:00
Ivo van Doorn afa620429a rt2x00: configure_filter() callback is allowed to sleep
The configure_filter() callback function no longer needs
to be atomic. Remove the scheduled work structure and
call into the driver configure_filter() directly.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:05 -04:00
Reinette Chatre 21f8a73f82 ipw2x00: fix sparse warnings
This fixes:

  CHECK   drivers/net/wireless/ipw2x00/ipw2100.c
drivers/net/wireless/ipw2x00/ipw2100.c:7888:22: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:188:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2100.c:7952:18: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:188:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2100.c:8000:18: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:188:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: originally declared here
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: originally declared here
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: originally declared here
  CC [M]  drivers/net/wireless/ipw2x00/ipw2100.o
  CHECK   drivers/net/wireless/ipw2x00/ipw2200.c
drivers/net/wireless/ipw2x00/ipw2200.c:847:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:891:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:935:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:980:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:1016:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:1051:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:1823:13: warning: symbol 'channel' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:86:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:6228:28: warning: symbol 'channel' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:86:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:6369:20: warning: symbol 'channel' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:86:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:6857:12: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:87:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:7964:13: warning: symbol 'channel' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:86:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:8720:12: warning: symbol 'channel' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:86:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:9662:13: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:87:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:9720:13: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:87:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:9826:13: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:87:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:10318:21: warning: symbol 'remaining_bytes' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:10184:13: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:8338:45: warning: cast to restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:4414:21: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ipw2x00/ipw2200.c:4414:21:    expected restricted __le16 [usertype] size
drivers/net/wireless/ipw2x00/ipw2200.c:4414:21:    got unsigned short [unsigned] [usertype] <noident>
drivers/net/wireless/ipw2x00/ipw2200.c:6105:33: warning: incorrect type in initializer (different base types)
drivers/net/wireless/ipw2x00/ipw2200.c:6105:33:    expected restricted __le16 [usertype] tx_rates
drivers/net/wireless/ipw2x00/ipw2200.c:6105:33:    got unsigned short [unsigned] [usertype] rates_mask
drivers/net/wireless/ipw2x00/ipw2200.c:6124:29: warning: bad assignment (>>=) to restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:6130:31: warning: restricted __le16 degrades to integer
drivers/net/wireless/ipw2x00/ipw2200.c:6140:23: warning: restricted __le16 degrades to integer
drivers/net/wireless/ipw2x00/ipw2200.c:6149:54: warning: restricted __le16 degrades to integer
drivers/net/wireless/ipw2x00/ipw2200.c:6151:37: warning: invalid assignment: &=
drivers/net/wireless/ipw2x00/ipw2200.c:6151:37:    left side has type restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:6151:37:    right side has type int
drivers/net/wireless/ipw2x00/ipw2200.c:6154:54: warning: restricted __le16 degrades to integer
drivers/net/wireless/ipw2x00/ipw2200.c:6156:37: warning: invalid assignment: &=
drivers/net/wireless/ipw2x00/ipw2200.c:6156:37:    left side has type restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:6156:37:    right side has type int
drivers/net/wireless/ipw2x00/ipw2200.c:6159:55: warning: restricted __le16 degrades to integer
drivers/net/wireless/ipw2x00/ipw2200.c:6161:37: warning: invalid assignment: &=
drivers/net/wireless/ipw2x00/ipw2200.c:6161:37:    left side has type restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:6161:37:    right side has type int
drivers/net/wireless/ipw2x00/ipw2200.c:6164:29: warning: invalid assignment: |=
drivers/net/wireless/ipw2x00/ipw2200.c:6164:29:    left side has type restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:6164:29:    right side has type unsigned short
drivers/net/wireless/ipw2x00/ipw2200.c:7853:29: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ipw2x00/ipw2200.c:7853:29:    expected signed char [signed] [usertype] [explicitly-signed] rt_dbmnoise
drivers/net/wireless/ipw2x00/ipw2200.c:7853:29:    got restricted __le16 [usertype] noise
drivers/net/wireless/ipw2x00/ipw2200.c:7967:25: warning: incorrect type in initializer (different base types)
drivers/net/wireless/ipw2x00/ipw2200.c:7967:25:    expected signed char [signed] [usertype] [explicitly-signed] noise
drivers/net/wireless/ipw2x00/ipw2200.c:7967:25:    got restricted __le16 [usertype] noise

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Cc: Zhu Yi <yi.zhu@intel.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:04 -04:00
John W. Linville e5539bcbf6 wl1271: remove print_mac usage
CC [M]  drivers/net/wireless/wl12xx/wl1271_main.o
drivers/net/wireless/wl12xx/wl1271_main.c: In function ‘wl1271_op_add_interface’:
drivers/net/wireless/wl12xx/wl1271_main.c:611: warning: ‘print_mac’ is deprecated (declared at include/linux/if_ether.h:142)

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:03 -04:00
Luis R. Rodriguez 608b88cb34 ath: move regulatory info into shared common structure
This moves the shared regulatory structure into the
common structure. We will use this ongoing for common
data.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:03 -04:00
Sujith 4c48381786 ath9k: Fix TX poll cancelling
In ath9k_stop(), tx_complete_work was being cancelled twice.
This patch fixes it. Also, locking sc->mutex should be done
at the beginning.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:03 -04:00
Bob Copeland bcd64e0c20 wl1251: halt the embedded CPU before loading firmware
After initial power-up, the embedded cpu is usually halted.  However,
if we down the interface and only do a soft reset before bringing
the interface back up, it will still be running and the firmware
loading code will bail out.  This change halts the CPU before loading
the firmware, enabling a second call to wl1251_boot() to succeed
without a hard reset.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:02 -04:00
Benoit PAPILLAULT 92ed48e523 rt2x00: Add support for retry rates
rt2800pci can handle different retry rates,
it will always step 1 rate down after a failed
transmission so creating the retry rate list
for mac80211 is quite simple.

Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:02 -04:00
Ivo van Doorn cd80b684a0 rt2x00: Fix MCS register intialization
According to the original Ralink driver,
LG_FBK_CFG0_OFDMMCS2FBK should be initialized to 9 rather then 3.

Based on a patch for rt2800pci from Benoit

Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:01 -04:00
Ivo van Doorn 534aff0288 rt2x00: wireless CLI ID and packet ID must not be 0
In the TX descriptor the Packet ID must not be 0,
so add 1 to the ID. The wireless CLI ID is not allowed
to be 0 either, but also must be initialized with the
wcid value rather then keyid.

Based on a patch for rt2800pci from Benoit

Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:01 -04:00
Ivo van Doorn 0fefe0fda4 rt2x00: Set SKBDESC_L2_PADDED in RX path
When the RX descriptor indicates the frame was L2 padded,
the SKBDESC_L2_PADDED flag should be set to make sure the
L2 padding is removed before it is send to mac80211.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:01 -04:00
Ivo van Doorn 05a32730f1 rt2x00: Add new RF chip defines
Add new defines for RF chipsets which can be found
by the driver. We don't have to check for these
chips specifically yet, but it is better to have
the defines in now.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:00 -04:00
Ivo van Doorn 1738c9e42a rt2x00: Fix for rt2800usb for SHARED_KEY_TABLE initializations
Fixed comments about SHARED_KEY_TABLE_BASE and SHARED_KEY_MODE_BASE.
Fixed initialization loop for SHARED_KEY_MODE_ENTRY.

Based on a patch for rt2800pci from Benoit.

Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:00 -04:00
Ivo van Doorn 73077c8545 rt2x00: Fix RFKILL polling
The rfkill_poll callback function in the drivers check a bit
to see if the RFKILL key has been pressed. However when the
bit is set it means the radio is active and the device can be
used.

The wiphy_rfkill_set_hw_state() function expects the inversed,
so '1' must be send when the radio must be disabled.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:00 -04:00
Gábor Stefanik 5f1c07d924 b43: LP-PHY: Fix setting TX power control mode during RC calibration
Call set_tx_power_control with a LPPHY_TXPCTL rather than an
LPPHY_TX_PWR_CTL_CMD_MODE.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:59 -04:00
Gábor Stefanik 12d4bba0fd b43: LP-PHY: Fix reading old mode in the set TX power control routine
Check the mode the hardware is in, not the mode we used the last time.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:59 -04:00
Bob Copeland 1de6f73c34 wl1251: correct definitions for 0th bit defines
ACX_SLV_SOFT_RESET_BIT and ACX_REG_EEPROM_START_BIT are both defined
as "1" in the vendor driver code, but they were defined to be BIT(1)
("2") here.

The SOFT_RESET typo ensures that wl1251_boot_soft_reset() doesn't;
as a result the device hangs when trying to reprogram the PLL
registers while running.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:58 -04:00
Johannes Berg f424afa178 mac80211: remove deprecated API
All but two drivers have now stopped using the two
deprecated members radio_enabled and beacon_int,
so it's about time to remove them for good.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:58 -04:00