kernel/kernel-generic.git
14 years agoorinoco: update status in MAINTAINERS
David Kilroy [Sat, 21 Aug 2010 11:13:45 +0000 (12:13 +0100)]
orinoco: update status in MAINTAINERS

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Cc: Pavel Roskin <proski@gnu.org>
Cc: David Gibson <hermes@gibson.dropbear.id.au>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoorinoco: Fix walking past the end of the buffer
David Kilroy [Sat, 21 Aug 2010 11:08:15 +0000 (12:08 +0100)]
orinoco: Fix walking past the end of the buffer

Fix walking past the end of the bitrate_table array
in the case when the loop counter == BITRATE_TABLE_SIZE.

Reported by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonet/mac80211: Use wiphy_<level>
Joe Perches [Fri, 20 Aug 2010 23:25:38 +0000 (16:25 -0700)]
net/mac80211: Use wiphy_<level>

Standardize logging messages from
printk(KERN_<level> "%s: " fmt , wiphy_name(foo), args);
to
wiphy_<level>(foo, fmt, args);

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: fix canceling monitor_recover timer
Stanislaw Gruszka [Fri, 20 Aug 2010 13:23:47 +0000 (15:23 +0200)]
iwlwifi: fix canceling monitor_recover timer

To make del_timer_sync() works we have to assure that timer function
does not rearm the timer. To achieve that we cancel timer with
STATUS_EXIT_PENDING bit set in __iwl{3945,}_down function.

Patch also fix priv->txq memory usage after free for iwl3945, because
it move timer cancellation before iwl3945_hw_txq_ctx_free(priv) is called.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Tue, 24 Aug 2010 20:35:40 +0000 (16:35 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

Conflicts:
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h

14 years agocfg80211: add some documentation
Johannes Berg [Thu, 19 Aug 2010 14:11:27 +0000 (16:11 +0200)]
cfg80211: add some documentation

Add some documentation for cfg80211. I'm hoping some of
the regulatory documentation will be filled by somebody
more familiar with it, hint hint! :)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: do not spuriously call ieee80211_scan_completed
Johannes Berg [Wed, 18 Aug 2010 16:35:22 +0000 (09:35 -0700)]
iwlwifi: do not spuriously call ieee80211_scan_completed

When a scan is aborted because the corresponding
virtual interface is removed, we may still later
attempt to tell mac80211 that the scan completed.
This is obviously wrong, since we already told it
that it was aborted, so don't do that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlagn: do not check for AP mode for WEP keys
Johannes Berg [Wed, 18 Aug 2010 16:35:21 +0000 (09:35 -0700)]
iwlagn: do not check for AP mode for WEP keys

Even when we configure WEP keys in AP mode
ones without a station pointer are default
keys, so don't check for AP mode here.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_htc: Add support for bluetooth coexistence.
Vivek Natarajan [Wed, 18 Aug 2010 14:27:49 +0000 (19:57 +0530)]
ath9k_htc: Add support for bluetooth coexistence.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_common: Move bt_stomp to common for sharing with ath9k_htc.
Vivek Natarajan [Wed, 18 Aug 2010 14:27:48 +0000 (19:57 +0530)]
ath9k_common: Move bt_stomp to common for sharing with ath9k_htc.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonl80211: some documentation fixes
Johannes Berg [Wed, 18 Aug 2010 15:44:36 +0000 (17:44 +0200)]
nl80211: some documentation fixes

The nl80211 documentation is currently never
generated, so problems have accumulated. Fix
most of the trivial ones.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix docbook
Johannes Berg [Wed, 18 Aug 2010 13:01:23 +0000 (15:01 +0200)]
mac80211: fix docbook

Fix a small problem in the documentation for
ieee80211_request_smps, and a now erroneous
inclusion of enum ieee80211_key_alg, which no
longer exists after the change to ciphers.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: wait for join command complete event
Grazvydas Ignotas [Tue, 17 Aug 2010 19:46:55 +0000 (22:46 +0300)]
wl1251: wait for join command complete event

Poll for join command completion instead of waiting blindly for 10
msecs. There is a timeout of 100 msecs, if the command doesn't complete
by then, we return an error code.

Based on wl1271 patch 99d84c1de8fdf5f9b09f07fdbc628857a040bf8b
by Luciano Coelho.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: fix beacon filter table structure
Grazvydas Ignotas [Tue, 17 Aug 2010 19:46:54 +0000 (22:46 +0300)]
wl1251: fix beacon filter table structure

The beacon filter table configuration ACX structure had certain elements
reversed, fix it to match TI driver.

Based on wl1271 patch 1937e742639c03a6fe77239c3003ce9602302117 by
Juuso Oikarinen.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: fix event handling mechanism
Grazvydas Ignotas [Tue, 17 Aug 2010 19:46:53 +0000 (22:46 +0300)]
wl1251: fix event handling mechanism

In case both A and B events occured simultaneously, current code
would only process A and clear both interrupts. Make it process both
events instead.

Based on wl1271 patches by Juuso Oikarinen:
1fd2794f36913992798184c464fe8f85753b13e0
13f2dc52c69bcca074cd12d4806953b2af45c386

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: add missing __packed modifier for some structs
Grazvydas Ignotas [Tue, 17 Aug 2010 19:46:52 +0000 (22:46 +0300)]
wl1251: add missing __packed modifier for some structs

Several acx and cmd structures are missing __packed modifier, add it.
This was noticed while comparing them with corresponding wl1271 code.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: move debug options into submenu
Jay Sternberg [Thu, 12 Aug 2010 19:15:55 +0000 (12:15 -0700)]
iwlwifi: move debug options into submenu

more debug options being added so it is useful to move them
into a submenu for ease of readability when using config commands
like make menuconfig and make xconfig

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: enable experimental ucode support
Jay Sternberg [Thu, 12 Aug 2010 17:24:07 +0000 (10:24 -0700)]
iwlwifi: enable experimental ucode support

ucode firmware may need to be released as experimental for testing or
debugging. released ucode filenames have the API version as the last
component.  experimental ucode files will have that component be "exp"
and the fw_version string reported by ethtool will also contain the
string EXP to clearly identify this ucode from released ucode.
EXP is short for EXPERIMENTAL since fw_version has a max lenght on 32.

this capability is controlled by Kconfig and defaulted to not be used.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: remove unused iwl_send_card_state function
Wey-Yi Guy [Wed, 11 Aug 2010 14:30:20 +0000 (07:30 -0700)]
iwlwifi: remove unused iwl_send_card_state function

iwl_send_card_state() is not being call from anywhere, remove it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: configurable ampdu factor and density
Wey-Yi Guy [Wed, 4 Aug 2010 19:02:43 +0000 (12:02 -0700)]
iwlwifi: configurable ampdu factor and density

Add ampdu factor and density to .cfg, this allow both parameters
can be configure per device based.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: more generic name for rssi calc in iwlagn
Wey-Yi Guy [Wed, 4 Aug 2010 15:42:17 +0000 (08:42 -0700)]
iwlwifi: more generic name for rssi calc in iwlagn

Change the define to more generic naming to match _agn devices
since the rssi calculation are common function for 5000 series and up

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: additional parameter in REPLY_RX_PHY_CMD
Wey-Yi Guy [Wed, 4 Aug 2010 15:05:33 +0000 (08:05 -0700)]
iwlwifi: additional parameter in REPLY_RX_PHY_CMD

Adding additional parameter in REPLY_RX_PHY_CMD, frame_time indicate the
frame's time on the air based on byte count and frame rate calculation

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlagn: continue perform rate scale when error detected
Wey-Yi Guy [Tue, 3 Aug 2010 15:23:32 +0000 (08:23 -0700)]
iwlagn: continue perform rate scale when error detected

If for some reason, the actual link command not matching neither
active nor search table; instead of return and not performing rate
scale, by-pass the data collection and continue the rate scale process.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlagn: adjust starting action for rate scale
Wey-Yi Guy [Sat, 31 Jul 2010 15:52:03 +0000 (08:52 -0700)]
iwlagn: adjust starting action for rate scale

During rate scale, reset starting action after making action adjustment
to avoid the possibility of break out of loop too early.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: refactor iwl_setup_rxon_timing
Johannes Berg [Thu, 29 Jul 2010 14:07:51 +0000 (07:07 -0700)]
iwlwifi: refactor iwl_setup_rxon_timing

All callers of iwl_setup_rxon_timing() also send
the command right away, so rename the function
to iwl_send_rxon_timing() and move the sending
into it. Also, some callers clear the data, this
can be done always and thus moved in as well.
Finally, there's no reason for the function to
acquire the spinlock, but it should be called
with the mutex held, so assert that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: cleanup iwl_set_rxon_channel()
Shanyu Zhao [Wed, 28 Jul 2010 03:45:15 +0000 (20:45 -0700)]
iwlwifi: cleanup iwl_set_rxon_channel()

Update outdated comments of iwl_set_rxon_channel() to reflect the
current signature. Also remove the unnecessary validation of the
channel. Those channel info are constructed in iwlwifi driver
and mac80211 will never modify the content of the struct. Also
everytime before this function is called the channel info has
been validated already (as a paranoid check).

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: avoid race condition in channel change
Shanyu Zhao [Wed, 28 Jul 2010 20:40:39 +0000 (13:40 -0700)]
iwlwifi: avoid race condition in channel change

When iwl_mac_config() is called by mac80211, the channel pointer
hw->conf->channel can potentially change, resulting in mismatch
band and channel number when configuring RXON command. To avoid
this situation, save the channel pointer in local variables
and validate the channel before using it. Note that priv->mutex
is locked during the whole function so the local variables are safe.

Same change is applied to iwl_mac_channel_switch() since basically
it copies code from iwl_mac_config().

Also removed an outdated comment in the flow.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: do not call ieee80211_frequency_to_channel
Shanyu Zhao [Wed, 28 Jul 2010 20:40:27 +0000 (13:40 -0700)]
iwlwifi: do not call ieee80211_frequency_to_channel

A few cases in iwlwifi driver function ieee80211_frequency_to_channel()
is called to get channel number from center frequency. This is not needed
since the channel number is already saved in hw_value field of struct
ieee80211_channel in function iwlcore_init_geos(). So replace those function
calls with hw_value field of struct ieee80211_channel.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: make aggregation time limit configurable
Wey-Yi Guy [Wed, 28 Jul 2010 16:18:54 +0000 (09:18 -0700)]
iwlwifi: make aggregation time limit configurable

By default, aggregation time limit is 4000 uSec, add the parameter to
.cfg
to allow this parameter can be configure per device base if needed.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: max/min aggregation time limit
Wey-Yi Guy [Wed, 28 Jul 2010 16:18:53 +0000 (09:18 -0700)]
iwlwifi: max/min aggregation time limit

Set the minimum and maximum for aggregation time limit in uSec.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: additional comments in iwl_cfg
Wey-Yi Guy [Fri, 23 Jul 2010 23:49:44 +0000 (16:49 -0700)]
iwlwifi: additional comments in iwl_cfg

No functional changes, just add additional comments to iwl_cfg structure

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: remove unused define
Wey-Yi Guy [Fri, 23 Jul 2010 20:42:39 +0000 (13:42 -0700)]
iwlwifi: remove unused define

IWL_SIXTY_SECS is not been used, remove it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoHostap: Fix "'ret' set but not used" warning message from GCC in hostap
Julian Calaby [Tue, 17 Aug 2010 18:52:41 +0000 (14:52 -0400)]
Hostap: Fix "'ret' set but not used" warning message from GCC in hostap

 CC [M]  drivers/net/wireless/hostap/hostap_ioctl.o
drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_request_scan':
drivers/net/wireless/hostap/hostap_ioctl.c:1666:6: warning: variable 'ret' set but not used

Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: fix thermal throttling related power management operation
Wey-Yi Guy [Fri, 6 Aug 2010 19:39:14 +0000 (12:39 -0700)]
iwlwifi: fix thermal throttling related power management operation

The current approach is very broken because it adds an
often-used code path that will not initialise "cmd" at all.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Shanyu Zhao <shanyu.zhao.intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211-hwsim: allow configuring IBSS
Johannes Berg [Tue, 17 Aug 2010 10:08:07 +0000 (12:08 +0200)]
mac80211-hwsim: allow configuring IBSS

It will not look standard-compliant in a sniffer
because because it doesn't
 * sync TSF
 * adjust the TSF in beacons
 * send beacons at TBTT
 * cancel beacons when another phy sends

However, it does allow testing the configuration
and parts of the mac80211 code for IBSS and as
such is still useful.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless: move documentation books
Johannes Berg [Tue, 17 Aug 2010 10:04:34 +0000 (12:04 +0200)]
wireless: move documentation books

This moves mac80211 documentation into a new
802.11 bookset and also adds a cfg80211 book
to the set. All of this is rather incomplete,
but it's easier to work with big code moving
as a separate patch.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agop54: improve eeprom parser
Christian Lamparter [Mon, 16 Aug 2010 23:16:58 +0000 (01:16 +0200)]
p54: improve eeprom parser

Like other vendors, p54* devices have a checksum for
the EEPROM descriptor data. This patch enhances the
parser code to generate and verify the data fields,
before initializing the radio-chip on the card.

Note:
If you have to bootstrap an alternative EEPROM image
for your device and you don't know how to generate a
valid crc ccitt checksum, you should take a look at:
http://git.kernel.org/?p=linux/kernel/git/chr/p54tools.git

The "checksum" utility loads a binary p54 EEPROM blob
(use the -f switch, to skip the check) and applies
the correct crc automatically.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agop54spi: fix eeprom checksum
Christian Lamparter [Mon, 16 Aug 2010 23:16:05 +0000 (01:16 +0200)]
p54spi: fix eeprom checksum

This patch corrects the bogus descriptor checksum of our
Nokia N8XX EEPROM blob.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: Implement RX core state setting for rev.2 and earlier PHYs
Gábor Stefanik [Mon, 16 Aug 2010 20:39:17 +0000 (22:39 +0200)]
b43: N-PHY: Implement RX core state setting for rev.2 and earlier PHYs

Rev.3+ support coming in a later patch.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: Implement MAC PHY clock set
Gábor Stefanik [Mon, 16 Aug 2010 20:39:16 +0000 (22:39 +0200)]
b43: N-PHY: Implement MAC PHY clock set

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: Fix typo in function name (gain_crtl -> gain_ctrl)
Gábor Stefanik [Mon, 16 Aug 2010 20:39:15 +0000 (22:39 +0200)]
b43: N-PHY: Fix typo in function name (gain_crtl -> gain_ctrl)

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: Implement Host Flags write during device init
Gábor Stefanik [Mon, 16 Aug 2010 20:39:14 +0000 (22:39 +0200)]
b43: N-PHY: Implement Host Flags write during device init

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: separate thermal throttling function
Wey-Yi Guy [Sat, 31 Jul 2010 15:34:07 +0000 (08:34 -0700)]
iwlwifi: separate thermal throttling function

"Thermal Throttling" is an advance feature which only available for
newer _agn devices. Move from iwl-core to iwl-agn for better code
organization.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agodrivers/net/wireless/wl12xx: Use available error codes
Julia Lawall [Mon, 16 Aug 2010 16:27:30 +0000 (18:27 +0200)]
drivers/net/wireless/wl12xx: Use available error codes

Error codes are stored in ret, but the return value is always 0.  Return
ret instead.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
local idexpression x;
constant C;
@@

if (...) { ...
  x = -C
  ... when != x
(
  return <+...x...+>;
|
  return NULL;
|
  return;
|
* return ...;
)
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agodrivers/net/wireless/wl12xx: Use available error codes
Julia Lawall [Mon, 16 Aug 2010 16:25:21 +0000 (18:25 +0200)]
drivers/net/wireless/wl12xx: Use available error codes

In each case, error codes are stored in ret, but the return value is always
0.  Return ret instead.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
local idexpression x;
constant C;
@@

if (...) { ...
  x = -C
  ... when != x
(
  return <+...x...+>;
|
  return NULL;
|
  return;
|
* return ...;
)
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: don't enable probe request rx for STAs
Bob Copeland [Sun, 15 Aug 2010 17:03:15 +0000 (13:03 -0400)]
ath5k: don't enable probe request rx for STAs

AR5K_RX_FILTER_PROBEREQ enables reception of probe requests,
but the filter flag FIF_BCN_PRBRESP_PROMISC is actually about
receiving beacons and probe _responses_, so we shouldn't
turn on the filter when scanning.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: remove all mention of monitor iftype
Bob Copeland [Sun, 15 Aug 2010 17:03:14 +0000 (13:03 -0400)]
ath5k: remove all mention of monitor iftype

Monitor interfaces are never seen by the driver so these
cases are never reached.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: remove monitor check in receive_frame_ok filter
Bob Copeland [Sun, 15 Aug 2010 17:03:13 +0000 (13:03 -0400)]
ath5k: remove monitor check in receive_frame_ok filter

Monitor interfaces are never seen by the driver, so tests based on
that opmode don't make sense.  Also, we already pass all mic
failure packets.

Consequently this code is actually accepting any frames with just
crypto errors and rejecting those with CRC, FIFO, and PHY errors for
all interface types.  Adjust the code and comment accordingly.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: clean up some comments
Bob Copeland [Sun, 15 Aug 2010 17:03:12 +0000 (13:03 -0400)]
ath5k: clean up some comments

This fixes a few misspellings, word repetitions, and some grammar
nits in ath5k comments.  No code changes.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: remove own (wrong) IEEE80211_MAX_LEN
Nick Kossifidis [Sun, 15 Aug 2010 17:03:11 +0000 (13:03 -0400)]
ath5k: remove own (wrong) IEEE80211_MAX_LEN

Use the version already supplied in include/linux/ieee80211.h.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: rename ath5k_hw_set_associd to _set_bssid
Nick Kossifidis [Sun, 15 Aug 2010 17:03:10 +0000 (13:03 -0400)]
ath5k: rename ath5k_hw_set_associd to _set_bssid

Although the named function also sets the aid, its main
purpose is configuring the bssid and we use that
everywhere else.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211/mac80211: extensible frame processing
Johannes Berg [Thu, 12 Aug 2010 13:38:38 +0000 (15:38 +0200)]
cfg80211/mac80211: extensible frame processing

Allow userspace to register for more than just
action frames by giving the frame subtype, and
make it possible to use this in various modes
as well.

With some tweaks and some added functionality
this will, in the future, also be usable in AP
mode and be able to replace the cooked monitor
interface currently used in that case.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove unused don't-encrypt flag
Johannes Berg [Thu, 12 Aug 2010 13:37:29 +0000 (15:37 +0200)]
mac80211: remove unused don't-encrypt flag

When MFP is disabled, action frames will not
be encrypted since they are management frames
and the only management frames that can then
be encrypted are authentication frames.

Therefore, setting the don't-encrypt flag on
action frames is unnecessary.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: mark ieee80211_hdrlen const
Johannes Berg [Thu, 12 Aug 2010 12:49:58 +0000 (14:49 +0200)]
cfg80211: mark ieee80211_hdrlen const

This function analyses only its single, value-passed
argument, and has no side effects. Thus it can be
const, which makes mac80211 smaller, for example:

   text    data     bss     dec     hex filename
 362518   16720     884  380122   5ccda mac80211.ko (before)
 362358   16720     884  379962   5cc3a mac80211.ko (after)

a 160 byte saving in text size, and an optimisation
because the function won't be called as often.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: use long monitor timer for 5300 series
Wey-Yi Guy [Wed, 18 Aug 2010 19:53:28 +0000 (12:53 -0700)]
iwlwifi: use long monitor timer for 5300 series

For 5000 series of devices, use long monitor timer to check
stuck tx queues.

This modification apply to all the 5000 series including 5300 and others.

Cc: stable@kernel.org [2.6.35]
Reported-by: drago01 <drago01@gmail.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agodrivers/net/wireless: Restore upper case words in wiphy_<level> messages
Joe Perches [Thu, 12 Aug 2010 02:11:19 +0000 (19:11 -0700)]
drivers/net/wireless: Restore upper case words in wiphy_<level> messages

Commit c96c31e499b70964cfc88744046c998bb710e4b8
"(drivers/net/wireless: Use wiphy_<level>)"
inadvertently changed some upper case words to
lower case.  Restore the original case.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: fix 3945 filter flags
Johannes Berg [Tue, 17 Aug 2010 09:24:01 +0000 (11:24 +0200)]
iwlwifi: fix 3945 filter flags

Applying the filter flags directly as done since

commit 3474ad635db371b0d8d0ee40086f15d223d5b6a4
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Thu Apr 29 04:43:05 2010 -0700

    iwlwifi: apply filter flags directly

broke 3945 under some unknown circumstances, as
reported by Alex.

Since I want to keep the direct application of
filter flags on iwlagn, duplicate the code into
both 3945 and agn and remove committing the
RXON that broke things from the 3945 version.

Cc: stable@kernel.org [2.6.35]
Reported-by: Alex Romosan <romosan@sycorax.lbl.gov>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoipw2100: don't sync status queue entries
John W. Linville [Fri, 13 Aug 2010 22:47:33 +0000 (18:47 -0400)]
ipw2100: don't sync status queue entries

These are allocated with pci_alloc_consistent, so calling
pci_dma_sync_single_for_cpu is incorrect usage of the API.  Remove this
misuse and consequently avoid the following backtrace:

WARNING: at lib/dma-debug.c:902 check_sync+0xce/0x43a()
Hardware name: 2373HU6
ipw2100 0000:02:02.0: DMA-API: device driver tries to sync DMA memory it has not allocated [device address=0x0000000034e88008] [size=8 bytes]
Modules linked in: microcode ipw2100(+) snd_seq_device ppdev libipw nsc_ircc snd_pcm lib80211 video output irda parport_pc cfg80211 parport thinkpad_acpi e1000 iTCO_wdt crc_ccitt snd_timer iTCO_vendor_support snd i2c_i801 pcspkr rfkill soundcore joydev snd_page_alloc yenta_socket radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core [last unloaded: scsi_wait_scan]
Pid: 0, comm: swapper Tainted: G        W   2.6.35-wl+ #8
Call Trace:
 [<c043aa42>] warn_slowpath_common+0x6a/0x7f
 [<c05d252a>] ? check_sync+0xce/0x43a
 [<c043aaca>] warn_slowpath_fmt+0x2b/0x2f
 [<c05d252a>] check_sync+0xce/0x43a
 [<c046189a>] ? print_lock_contention_bug+0x11/0xb2
 [<c05d2b6f>] debug_dma_sync_single_for_cpu+0x47/0x49
 [<c06cbd3c>] ? ehci_irq+0x31/0x331
 [<f82a224a>] ? ipw2100_irq_tasklet+0x24/0x5e9 [ipw2100]
 [<f82a224a>] ? ipw2100_irq_tasklet+0x24/0x5e9 [ipw2100]
 [<f82a221d>] pci_dma_sync_single_for_cpu.clone.1+0x42/0x4b [ipw2100]
 [<f82a23a2>] ipw2100_irq_tasklet+0x17c/0x5e9 [ipw2100]
 [<c043fd87>] tasklet_action+0x78/0xcb
 [<c0440293>] __do_softirq+0xc4/0x183
 [<c044038d>] do_softirq+0x3b/0x5f
 [<c04404d0>] irq_exit+0x3a/0x6d
 [<c0404423>] do_IRQ+0x8b/0x9f
 [<c04038b5>] common_interrupt+0x35/0x3c
 [<c062ecfa>] ? acpi_idle_enter_simple+0xfe/0x13c
 [<c045007b>] ? exit_itimers+0x2d/0x73
 [<c062ecfc>] ? acpi_idle_enter_simple+0x100/0x13c
 [<c070bf10>] cpuidle_idle_call+0x78/0xdc
 [<c040251c>] cpu_idle+0x9b/0xb7
 [<c07b1dd2>] rest_init+0xa6/0xab
 [<c0a4b96d>] start_kernel+0x389/0x38e
 [<c0a4b0c9>] i386_start_kernel+0xc9/0xd0

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agodrivers/net/wireless/libertas/cfg.c: needs sched.h
Andrew Morton [Wed, 11 Aug 2010 01:01:06 +0000 (18:01 -0700)]
drivers/net/wireless/libertas/cfg.c: needs sched.h

i386 allmodconfig:

drivers/net/wireless/libertas/cfg.c: In function 'lbs_scan_worker':
drivers/net/wireless/libertas/cfg.c:722: error: 'TASK_NORMAL' undeclared (first use in this function)
drivers/net/wireless/libertas/cfg.c:722: error: (Each undeclared identifier is reported only once
drivers/net/wireless/libertas/cfg.c:722: error: for each function it appears in.)
drivers/net/wireless/libertas/cfg.c: In function 'lbs_cfg_connect':
drivers/net/wireless/libertas/cfg.c:1267: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
drivers/net/wireless/libertas/cfg.c:1267: error: implicit declaration of function 'signal_pending'
drivers/net/wireless/libertas/cfg.c:1267: error: implicit declaration of function 'schedule_timeout'

So wait.h has a dependency on sched.h, but doesn't include sched.h.  This
patch doesn't fix that.

Cc: Dan Williams <dcbw@redhat.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: check if WEP is available for shared key auth
Johannes Berg [Tue, 10 Aug 2010 07:46:42 +0000 (09:46 +0200)]
cfg80211: check if WEP is available for shared key auth

When shared key auth is requested, cfg80211
should verify that the device is capable of
WEP crypto which is required.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: dont advertise WEP if unavailable
Johannes Berg [Tue, 10 Aug 2010 07:46:41 +0000 (09:46 +0200)]
mac80211: dont advertise WEP if unavailable

When WEP is unavailable, don't advertise it
to cfg80211.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove unused status flag checks
Johannes Berg [Tue, 10 Aug 2010 07:46:40 +0000 (09:46 +0200)]
mac80211: remove unused status flag checks

The decryption code verifies whether or not
a given frame was decrypted and verified by
hardware. This is unnecessary, as the crypto
RX handler already does it long before the
decryption code is even invoked, so remove
that code to avoid confusion.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: move key tfm setup
Johannes Berg [Tue, 10 Aug 2010 07:46:39 +0000 (09:46 +0200)]
mac80211: move key tfm setup

There's no need to keep separate if statements
for setting up the CCMP/AES-CMAC tfm structs;
move that into the existing switch statement.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: use cipher suite selectors
Johannes Berg [Tue, 10 Aug 2010 07:46:38 +0000 (09:46 +0200)]
mac80211: use cipher suite selectors

Currently, mac80211 translates the cfg80211
cipher suite selectors into ALG_* values.
That isn't all too useful, and some drivers
benefit from the distinction between WEP40
and WEP104 as well. Therefore, convert it
all to use the cipher suite selectors.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas: [spi] use common firmware request helper and new firmware locations
Dan Williams [Sun, 8 Aug 2010 02:16:30 +0000 (21:16 -0500)]
libertas: [spi] use common firmware request helper and new firmware locations

linux-firmware puts libertas firmware in /libertas.  Fix the driver to
look there first, but fall back to the old firmware names if the new
ones don't exist.  Add preference for newer firmware versions too.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas: [sdio] use common firmware request helper and new firmware locations
Dan Williams [Sun, 8 Aug 2010 02:15:52 +0000 (21:15 -0500)]
libertas: [sdio] use common firmware request helper and new firmware locations

linux-firmware puts libertas firmware in /libertas.  Fix the driver to
look there first, but fall back to the old firmware names if the new
ones don't exist.  Add preference for newer firmware versions too.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas: [cs] use common firmware request helper and new firmware locations
Dan Williams [Sun, 8 Aug 2010 02:15:19 +0000 (21:15 -0500)]
libertas: [cs] use common firmware request helper and new firmware locations

linux-firmware puts libertas firmware in /libertas.  Fix the driver to
look there first, but fall back to the old firmware names if the new
ones don't exist.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas: add two-stage firmware request helper
Dan Williams [Sun, 8 Aug 2010 02:14:33 +0000 (21:14 -0500)]
libertas: add two-stage firmware request helper

SDIO, GSPI, and CS all use 2-stage firmware and the loading
process and logic should be the same.  Allow module parameters
to override the automatic firmware choice, otherwise just walk
the bus driver's firmware table and pick out the first firmware
pair that exists for the given model.

Some special care is taken to allow overriding of just the helper
or the main firmware, but let the other of the pair be chosen
automatically.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas: [usb] use new firmware locations
Dan Williams [Sun, 8 Aug 2010 02:13:57 +0000 (21:13 -0500)]
libertas: [usb] use new firmware locations

Look for firmware where the linux-firmware tree actually puts it, but
fall back to original firmware name & location when the new location
doesn't exist.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Remove ieee80211_rx_status from rt2x00_dev
Ivo van Doorn [Fri, 6 Aug 2010 18:49:27 +0000 (20:49 +0200)]
rt2x00: Remove ieee80211_rx_status from rt2x00_dev

rt2x00 was keeping a copy of ieee80211_rx_status embedded
into the rt2x00_dev structure. For each RX frame, this structure
was copied into the skb->cb where mac80211 would handle it further.

However at the moment only the fields current band, and frequency
were updated. Whereas the band was already provided directly within
the rt2x00_dev structure. Save a memcpy action, and reduce memory
a bit, by adding a curr_freq field to rt2x00_dev, and completely
remove the ieee80211_rx_status structure from rt2x00_dev.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Update comments regarding TXWI and TX_STA_FIFO
Helmut Schaa [Fri, 6 Aug 2010 18:48:27 +0000 (20:48 +0200)]
rt2x00: Update comments regarding TXWI and TX_STA_FIFO

Add some comments about the TXWI fields and the TX_STA_FIFO register.
Especially describe the relationship between the TXWI field PACKETID
and the PID field in the TX_STA_FIFO register.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Implement TX status reporting for rt2800usb
Ivo van Doorn [Fri, 6 Aug 2010 18:47:57 +0000 (20:47 +0200)]
rt2x00: Implement TX status reporting for rt2800usb

The TX_STA_FIFO register which is used for per-frame TX frame
status reporting is also valid on rt2800usb. We can move the
rt2800pci_txdone function into rt2800lib where it can also
be used by rt2800usb.

rt2800usb needs to overwrite the txdone work handler to
a different function.

Both rt2800usb as rt2800_txdone need to take into account
that IO failures can occur while uploading the URB, which
means that when obtaining the new entry the IO status must
be checked.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Request TXWI pointer from driver
Ivo van Doorn [Fri, 6 Aug 2010 18:47:20 +0000 (20:47 +0200)]
rt2x00: Request TXWI pointer from driver

The only reason why the write_tx_data callback function
is needed inside the driver, is because the location of
the TXWI descriptor is different on PCI and USB hardware.
Except for the beacon, where the TXWI is always at the
start of the SKB buffer.

In both cases the drivers write_tx_data function only
wrap around the function rt2800_write_txwi. Move write_tx_data
completely into the rt2800lib library, and add a callback
function to obtain the TXWI pointer.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Add helper function for reporting tx status
Ivo van Doorn [Fri, 6 Aug 2010 18:46:53 +0000 (20:46 +0200)]
rt2x00: Add helper function for reporting tx status

At some points, some drivers can't report the full TX status
information. This can happen for the UNKNOWN state, or the
FAILURE state (in case the URB failed).
Add a wrapper function to simplify reporting the
empty TX information.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Set MIMO PS flag in tx descriptor for STAs in dynamic SMPS mode
Ivo van Doorn [Fri, 6 Aug 2010 18:46:19 +0000 (20:46 +0200)]
rt2x00: Set MIMO PS flag in tx descriptor for STAs in dynamic SMPS mode

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Move USB tx/rx done handling to workqueue
Ivo van Doorn [Fri, 6 Aug 2010 18:45:38 +0000 (20:45 +0200)]
rt2x00: Move USB tx/rx done handling to workqueue

Move all TX and RX completion handling into a work structure,
which is handeled on the mac80211 workqueue. This simplifies
the code in rt2x00lib since it no longer needs to check if the
device is USB or PCI to decide which mac80211 function should be used.

In the watchdog some changes are needed since it can no longer rely
on the TX completion function to be run while looping through the
entries. (Both functions now work on the same workqueue, so this
would deadlock). So the watchdog now waits for the URB to return,
and handle the TX status report directly.

As a side-effect, the debugfs entry for the RX queue now correctly
displays the positions of the INDEX and INDEX_DONE counters. This
also implies that it is not possible to perform checks like queue_empty()
and queue_full() on the RX queue.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: remove duplicate get_hw_crypto_keytype()
Luis R. Rodriguez [Thu, 5 Aug 2010 21:56:54 +0000 (17:56 -0400)]
ath9k: remove duplicate get_hw_crypto_keytype()

Use ath9k_cmn_get_hw_crypto_keytype() instead which is
already exported and shared, and does exactly the same thing.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agodrivers/net/wireless/ath/ath9k: Adjust confusing if indentation
Julia Lawall [Thu, 5 Aug 2010 20:26:56 +0000 (22:26 +0200)]
drivers/net/wireless/ath/ath9k: Adjust confusing if indentation

Outdent the code following the if.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable braces4@
position p1,p2;
statement S1,S2;
@@

(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

if (p1[0].column == p2[0].column):
  cocci.print_main("branch",p1)
  cocci.print_secs("after",p2)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agodrivers/net/wireless/prism54: Adjust confusing if indentation
Julia Lawall [Thu, 5 Aug 2010 20:26:04 +0000 (22:26 +0200)]
drivers/net/wireless/prism54: Adjust confusing if indentation

Indent the branch of an if.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable braces4@
position p1,p2;
statement S1,S2;
@@

(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

if (p1[0].column == p2[0].column):
  cocci.print_main("branch",p1)
  cocci.print_secs("after",p2)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agodrivers/net/wireless/libertas: Adjust confusing if indentation
Julia Lawall [Thu, 5 Aug 2010 20:23:54 +0000 (22:23 +0200)]
drivers/net/wireless/libertas: Adjust confusing if indentation

At the point of the patched code, err has already been tested, so it is
only worthwhile to test it again in the if branches where it is changed.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable braces4@
position p1,p2;
statement S1,S2;
@@

(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

if (p1[0].column == p2[0].column):
  cocci.print_main("branch",p1)
  cocci.print_secs("after",p2)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: support sysfs namespaces
Johannes Berg [Thu, 5 Aug 2010 15:45:15 +0000 (17:45 +0200)]
cfg80211: support sysfs namespaces

Enable using network namespaces with
wireless devices even when sysfs is
enabled using the same infrastructure
that was built for netdevs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: allow drivers to request SM PS mode change
Johannes Berg [Thu, 5 Aug 2010 15:05:55 +0000 (17:05 +0200)]
mac80211: allow drivers to request SM PS mode change

Sometimes drivers have more information than the
stack about how their antennas/chains are used,
and may require that the SM PS mode be changed.
This could happen, for example, when detecting
that the user disconnected an antenna. Thus this
patch introduces API to allow drivers to request
SM PS mode changes.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: per interface idle notification
Johannes Berg [Thu, 5 Aug 2010 15:02:38 +0000 (17:02 +0200)]
mac80211: per interface idle notification

Sometimes we don't just need to know whether or
not the device is idle, but also per interface.
This adds that reporting capability to mac80211.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonet: mac80211: Fix a typo.
Andrea Gelmini [Thu, 5 Aug 2010 13:51:35 +0000 (15:51 +0200)]
net: mac80211: Fix a typo.

"userpace" -> "userspace"

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: deauth doesn't always imply disconnect
Johannes Berg [Thu, 5 Aug 2010 08:20:27 +0000 (10:20 +0200)]
cfg80211: deauth doesn't always imply disconnect

When an AP sends a deauth frame, or we send one
to an AP, that only means we lost our connection
if we were actually connected to that AP. Check
this to avoid sending spurious "disconnected"
events and breaking "iw ... link" reporting.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: AMPDU rx reorder timeout timer
Christian Lamparter [Wed, 4 Aug 2010 23:36:41 +0000 (01:36 +0200)]
mac80211: AMPDU rx reorder timeout timer

This patch introduces a new timer, which will release
queued-up MPDUs from the reorder buffer, whenever
they've waited for more than HT_RX_REORDER_BUF_TIMEOUT
(which is at around 100 ms).

The advantage of having a dedicated timer, instead of
relying on a constant stream of freshly arriving aMPDUs
to release the old ones, is particularly observable when
even a small fraction of MPDUs are forever lost at
low network speeds.

Previously under these circumstances frames would become
stuck in the reorder buffer and the network stack of both
HT peers throttled back, instead of revving up and
gunning the pipes.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove unused rate function parameter
Christian Lamparter [Wed, 4 Aug 2010 23:36:36 +0000 (01:36 +0200)]
mac80211: remove unused rate function parameter

This patch removes a few stale parameters and variables
which survived the last, large rx-path reorganization:
"mac80211: correctly place aMPDU RX reorder code"

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: put rx handlers into separate functions
Christian Lamparter [Wed, 4 Aug 2010 23:36:04 +0000 (01:36 +0200)]
mac80211: put rx handlers into separate functions

This patch takes the reorder logic from the RX path and
moves it into separate routines to make the expired frame
release accessible.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: shorten the calibration interval during strong interference
Felix Fietkau [Mon, 2 Aug 2010 13:53:15 +0000 (15:53 +0200)]
ath9k: shorten the calibration interval during strong interference

When the noise floor limits are being bypassed because of strong
interference, sensitivity is also reduced.
In order to recover from this as quickly as possible, trigger a
long periodic calibration every second instead of every 30 seconds,
until the NF median is within limits again. This is especially important
if the interference lasts for a while, since it takes multiple clean
NF calibrations to bring the median back to normal.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: use AP beacon miss as a trigger for fast recalibration
Felix Fietkau [Mon, 2 Aug 2010 13:53:14 +0000 (15:53 +0200)]
ath9k: use AP beacon miss as a trigger for fast recalibration

When beacons get stuck in AP mode, the most likely cause is interference.
Such interference can often go on for a while, and too many consecutive
beacon misses can lead to connected clients getting dropped.

Since connected clients might not be subjected to the same interference
if that happens to be very local, the AP should try to deal with it as
good as it can. One way to do this is to trigger an NF calibration with
automatic baseband update right after the beacon miss. In my tests with
very strong interference, this allowed the AP to continue transmitting
beacons after only 2-3 misses, which allows a normal client to stay
connected.

With some of the newer - really sensitive - chips, the maximum noise
floor limit is very low, which can be problematic during very strong
interference. To avoid an endless loop of stuck beacons -> nfcal ->
periodic calibration -> stuck beacons, the beacon miss event also sets
a flag, which allows the calibration code to bypass the chip specific
maximum NF value. This flag is automatically cleared, as soon as the
first NF median goes back below the limits for all chains.

In my tests, this allowed an ath9k AP to survive very strong interference
(measured NF: -68, or sometimes even higher) without losing connectivity
to its clients. Even under these conditions, I was able to transmit
several mbits/s through the interface.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: apply the noise floor validation to the median instead of single
Felix Fietkau [Mon, 2 Aug 2010 13:53:13 +0000 (15:53 +0200)]
ath9k_hw: apply the noise floor validation to the median instead of single

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: add a separate debug level for stuck beacons
Felix Fietkau [Mon, 2 Aug 2010 13:53:12 +0000 (15:53 +0200)]
ath9k: add a separate debug level for stuck beacons

Stuck beacons are a useful indicator for debugging various PHY
issues such as calibration. Putting them on the same debug level
as the other beacon stuff makes it hard to spot them in huge amounts
of spam.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Don't squash error codes in key setup functions
Ben Hutchings [Sun, 1 Aug 2010 16:37:03 +0000 (17:37 +0100)]
mac80211: Don't squash error codes in key setup functions

ieee80211_add_key() currently returns -ENOMEM in case of any error,
including a missing crypto algorithm.  Change ieee80211_key_alloc()
and ieee80211_aes_{key_setup_encrypt,cmac_key_setup}() to encode
errors with ERR_PTR() rather than returning NULL, and change
ieee80211_add_key() accordingly.

Compile-tested only.

Reported-by: Marcin Owsiany <porridge@debian.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: track IBSS manager status
Johannes Berg [Sat, 31 Jul 2010 15:34:10 +0000 (08:34 -0700)]
iwlwifi: track IBSS manager status

Only the IBSS manager, ie. the station that sent
the IBSS beacon last, should be replying to probe
responses. This requires implementing the mac80211
tx_last_beacon callback, which we can do thanks to
the ucode beacon notification.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: make iwl_set_hw_params static to _agn
Wey-Yi Guy [Sat, 31 Jul 2010 15:34:08 +0000 (08:34 -0700)]
iwlwifi: make iwl_set_hw_params static to _agn

iwl_set_hw_params() only used by _agn, make it static

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlagn: log pci revision id
Wey-Yi Guy [Sat, 31 Jul 2010 15:34:06 +0000 (08:34 -0700)]
iwlagn: log pci revision id

Log the information after reading the PCI_REVISION_ID
from pci config space,

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: make iwl_hw_detect static to _agn
Wey-Yi Guy [Sat, 31 Jul 2010 15:34:05 +0000 (08:34 -0700)]
iwlwifi: make iwl_hw_detect static to _agn

iwl_hw_detect() only used by _agn, make it static

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas_tf: if_usb.c: Some more formatting fixes
Thomas Klute [Sat, 31 Jul 2010 10:01:45 +0000 (12:01 +0200)]
libertas_tf: if_usb.c: Some more formatting fixes

Split some long lines to make checkpatch.pl happy. ;-)

Signed-off-by: Thomas Klute <thomas2.klute@uni-dortmund.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas_tf: if_usb.c: Whitespace cleanup
Thomas Klute [Sat, 31 Jul 2010 10:01:44 +0000 (12:01 +0200)]
libertas_tf: if_usb.c: Whitespace cleanup

Signed-off-by: Thomas Klute <thomas2.klute@uni-dortmund.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: unify scan and work mutexes
Johannes Berg [Fri, 30 Jul 2010 14:46:07 +0000 (16:46 +0200)]
mac80211: unify scan and work mutexes

Having both scan and work mutexes is not just
a bit too fine grained, it also creates issues
when there's code that needs both since they
then need to be acquired in the right order,
which can be hard to do.

Therefore, use just a single mutex for both.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>