]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
13 years agowl12xx: Enable AP-mode
Arik Nemtsov [Sat, 16 Oct 2010 19:53:24 +0000 (21:53 +0200)]
wl12xx: Enable AP-mode

Indicate support for the NL80211_IFTYPE_AP interface mode to enable AP
mode operation.

Disable 11a when operating in AP-mode (unsupported for now).

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Read MAC address from NVS file on HW startup
Arik Nemtsov [Sat, 16 Oct 2010 19:49:52 +0000 (21:49 +0200)]
wl12xx: Read MAC address from NVS file on HW startup

Try to read the MAC address from the on-disk NVS file.
A non-zero MAC address is required to add an AP interface.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: AP mode - fetch appropriate firmware for AP
Arik Nemtsov [Sat, 16 Oct 2010 19:44:57 +0000 (21:44 +0200)]
wl12xx: AP mode - fetch appropriate firmware for AP

AP and STA modes use different firmwares.

Differentiate the firmware files by name and fetch the appropriate one
when add_interface is called by mac80211. The STA firmware is chosen for
PLT mode.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: AP mode - encryption support
Arik Nemtsov [Sat, 16 Oct 2010 19:39:06 +0000 (21:39 +0200)]
wl12xx: AP mode - encryption support

Encryption key configuration is different for AP/STA modes.

AP encryption keys are recorded when the BSS is not started. On BSS
start they are propagated to the AP (in wl1271_ap_init_hwenc).

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: AP mode - record TX configuration settings
Arik Nemtsov [Sat, 16 Oct 2010 18:33:45 +0000 (20:33 +0200)]
wl12xx: AP mode - record TX configuration settings

Record TX configuration settings in the "conf" member of our global
structure (struct wl1271) if conf_tx is called when the firmware is
not loaded.

Later on when the firmware is loaded, we apply the tx conf as part of
the init sequence.

Important for AP mode since conf_tx is called before add_interface
(where the firmware is initialized).

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: AP mode - changes in TX path
Arik Nemtsov [Sat, 16 Oct 2010 18:27:53 +0000 (20:27 +0200)]
wl12xx: AP mode - changes in TX path

When in AP mode set appropriate HLID and rate policy for each skb.
Respond to supported-rates related changes in op_tx only when acting
as STA.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: AP mode - add STA add/remove ops
Arik Nemtsov [Sat, 16 Oct 2010 18:21:23 +0000 (20:21 +0200)]
wl12xx: AP mode - add STA add/remove ops

Allocate and free host link IDs (HLIDs) for each link. A per-STA
data structure keeps the HLID of each STA.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: AP mode - change filter config
Arik Nemtsov [Sat, 16 Oct 2010 17:25:35 +0000 (19:25 +0200)]
wl12xx: AP mode - change filter config

Do not configure a group address table in AP mode

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: AP mode config in ieee80211_ops.config
Arik Nemtsov [Sat, 16 Oct 2010 17:17:02 +0000 (19:17 +0200)]
wl12xx: AP mode config in ieee80211_ops.config

Separate configuration according to mode. AP has different rate
set configuration and no handling of idle-state.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Configure AP on BSS info change
Arik Nemtsov [Sat, 16 Oct 2010 17:07:21 +0000 (19:07 +0200)]
wl12xx: Configure AP on BSS info change

Configure AP-specific beacon and probe response templates.
Start the AP when beaconing is enabled.

The wl1271_bss_info_changed() function has been split into AP/STA
specific handlers.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Add AP related definitions to HOST-FW interface
Arik Nemtsov [Sat, 16 Oct 2010 16:53:48 +0000 (18:53 +0200)]
wl12xx: Add AP related definitions to HOST-FW interface

Change structures in a non-destructive manner. This means no
changes in size or location of existing members used by STA.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: AP specific RX filter configuration
Arik Nemtsov [Sat, 16 Oct 2010 16:45:07 +0000 (18:45 +0200)]
wl12xx: AP specific RX filter configuration

Set filters according to the mode of operation.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: AP mode - init sequence
Arik Nemtsov [Sat, 16 Oct 2010 16:19:53 +0000 (18:19 +0200)]
wl12xx: AP mode - init sequence

Split HW init sequence into AP/STA specific parts

The AP specific init sequence includes configuration of templates, rate
classes, power mode, etc. Also unmask AP specific events in the event mbox.

Separate the differences between AP and STA init into mode
specific functions called from wl1271_hw_init. The first is called after
radio configuration and the second after memory configuration.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: AP mode - workaround for FW bug on station remove
Arik Nemtsov [Fri, 12 Nov 2010 15:15:03 +0000 (17:15 +0200)]
wl12xx: AP mode - workaround for FW bug on station remove

Sometimes an event indicating station removal is not sent up by
firmware. We work around this by always indicating success in when
a wait for the event timeouts.

Temporary workaround until a FW fix is introduced.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: AP-mode high level commands
Arik Nemtsov [Sat, 16 Oct 2010 16:08:58 +0000 (18:08 +0200)]
wl12xx: AP-mode high level commands

Add commands to start/stop BSS, add/remove STA and configure encryption
keys. Split the encryption commands "set key" and "set default key" into
AP and STA specific versions.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: AP mode - add AP specific event
Arik Nemtsov [Mon, 25 Oct 2010 09:17:44 +0000 (11:17 +0200)]
wl12xx: AP mode - add AP specific event

Add STA-remove completion event. Unmask it during boot if operating in
AP-mode.
Ignore unrelated events in AP-mode.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: AP mode - AP specific CMD_CONFIGURE sub-commands
Arik Nemtsov [Sat, 16 Oct 2010 15:52:59 +0000 (17:52 +0200)]
wl12xx: AP mode - AP specific CMD_CONFIGURE sub-commands

Add AP max retries and rate policy configuration.
Rename STA rate policy configuration function.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Add AP related configuration to conf_drv_settings
Arik Nemtsov [Sat, 16 Oct 2010 15:44:51 +0000 (17:44 +0200)]
wl12xx: Add AP related configuration to conf_drv_settings

Rate class configuration has been split up for AP and STA modes.
Template related configuration likewise separated.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: fix some sparse warnings
Eliad Peller [Wed, 22 Dec 2010 11:38:52 +0000 (12:38 +0100)]
wl12xx: fix some sparse warnings

Note that wl1271_write32() calls cpu_to_le32() by itself, so calling
wl1271_write32(addr, cpu_to_le32(val)) is in fact a bug on BE systems.

Fix the following sparse warnings:

drivers/net/wireless/wl12xx/cmd.c:662:16: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/cmd.c:662:16:    expected unsigned short [unsigned] [addressable] [usertype] llc_type
drivers/net/wireless/wl12xx/cmd.c:662:16:    got restricted __be16 [usertype] <noident>
drivers/net/wireless/wl12xx/cmd.c:674:17: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/cmd.c:674:17:    expected unsigned int [unsigned] [addressable] [usertype] sender_ip
drivers/net/wireless/wl12xx/cmd.c:674:17:    got restricted __be32 [usertype] ip_addr
drivers/net/wireless/wl12xx/rx.c:202:4: warning: incorrect type in argument 3 (different base types)
drivers/net/wireless/wl12xx/rx.c:202:4:    expected unsigned int [unsigned] [usertype] val
drivers/net/wireless/wl12xx/rx.c:202:4:    got restricted __le32 [usertype] <noident>
drivers/net/wireless/wl12xx/acx.c:1247:23: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/acx.c:1247:23:    expected restricted __le32 [usertype] ht_capabilites
drivers/net/wireless/wl12xx/acx.c:1247:23:    got unsigned long
drivers/net/wireless/wl12xx/acx.c:1250:24: warning: invalid assignment: |=
drivers/net/wireless/wl12xx/acx.c:1250:24:    left side has type restricted __le32
drivers/net/wireless/wl12xx/acx.c:1250:24:    right side has type unsigned long
drivers/net/wireless/wl12xx/acx.c:1253:24: warning: invalid assignment: |=
drivers/net/wireless/wl12xx/acx.c:1253:24:    left side has type restricted __le32
drivers/net/wireless/wl12xx/acx.c:1253:24:    right side has type unsigned long
drivers/net/wireless/wl12xx/acx.c:1256:24: warning: invalid assignment: |=
drivers/net/wireless/wl12xx/acx.c:1256:24:    left side has type restricted __le32
drivers/net/wireless/wl12xx/acx.c:1256:24:    right side has type unsigned long

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: use after free in debug code
Dan Carpenter [Tue, 21 Dec 2010 04:00:13 +0000 (07:00 +0300)]
wl12xx: use after free in debug code

If debugging is turned on, then wl1271_dump() dereferences a freed
variable.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agowl12xx: remove redundant debugfs_remove_recursive() call
Eliad Peller [Wed, 15 Dec 2010 09:47:54 +0000 (11:47 +0200)]
wl12xx: remove redundant debugfs_remove_recursive() call

Upon rmmod, the <debugfs>/ieee80211/phyX dir is being removed.
later, we try to remove <debugfs>/ieee80211/phyX/wl12xx, which
might result in NULL dereference.

Remove the excessive debugfs_remove_recursive() call.
(consequently, there is no more need to save wl->rootdir)

Reported-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
13 years agoiwlwifi: initial P2P support
Wey-Yi Guy [Fri, 14 Jan 2011 01:09:29 +0000 (17:09 -0800)]
iwlwifi: initial P2P support

If PAN functionality is present, advertise
P2P interface type support and thus support
for P2P. However, the support is currently
somewhat incomplete -- NoA schedule isn't
added to probe responses, and 11b bitrates
may be used still, etc. Therefore, make it
all optional with a Kconfig option.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: replace minimum slot time constant
Johannes Berg [Thu, 6 Jan 2011 16:07:11 +0000 (08:07 -0800)]
iwlwifi: replace minimum slot time constant

There are a number of places where the minimum
slot time is hardcoded to 20 TU, add a new
constant for that and use it everywhere.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: implement remain-on-channel
Johannes Berg [Thu, 6 Jan 2011 16:07:10 +0000 (08:07 -0800)]
iwlwifi: implement remain-on-channel

For device supporting PAN/P2P, use the PAN
context to implement the remain-on-channel
operation using device offloads so that the
filters in the device will be programmed
correctly -- otherwise we cannot receive
any probe request frames during off-channel
periods.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoiwlagn: Enable idle powersave mode in 1000 series
Meenakshi Venkataraman [Thu, 13 Jan 2011 19:35:26 +0000 (11:35 -0800)]
iwlagn: Enable idle powersave mode in 1000 series

The iwlagn powersave algorithm uses the supports_idle parameter
to tell the device to save power when it is not associated with
an AP and is idle.

Enable this feature for the 1000 series of devices.

Reported-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: correct debugfs data dumped from sram
Jay Sternberg [Tue, 11 Jan 2011 23:41:00 +0000 (15:41 -0800)]
iwlwifi: correct debugfs data dumped from sram

the sram data dumped through the debugfs interface would only work properly
when dumping data on even u32 boundaries and swap bytes based on endianness
on that boundary making byte arrays impossible to read.

now addresses are displayed at the start of every line and the data is
displayed consistently if dumping 1 byte or 20 and regardless of what is the
starting address.

if no lenght given, address displayed is u32 in device format

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: add hw rev for 2000 series devices
Wey-Yi Guy [Mon, 10 Jan 2011 22:34:38 +0000 (14:34 -0800)]
iwlwifi: add hw rev for 2000 series devices

2000 series device has different HW rev, add it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: remove g2 from csr hw rev
Wey-Yi Guy [Mon, 10 Jan 2011 22:24:28 +0000 (14:24 -0800)]
iwlwifi: remove g2 from csr hw rev

Remove refernce of g2 and use offical number for hw rev.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove Gen2 from Kconfig
Wey-Yi Guy [Tue, 11 Jan 2011 23:59:49 +0000 (15:59 -0800)]
iwlagn: remove Gen2 from Kconfig

Remove Gen 2 from Kconfig file since 6005/6030/6150 series of
products are released.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: add 2000 series to Kconfig
Wey-Yi Guy [Tue, 11 Jan 2011 23:54:19 +0000 (15:54 -0800)]
iwlagn: add 2000 series to Kconfig

Add 2000 series support to Kconfig

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: add 2000 series pci id
Wey-Yi Guy [Sat, 8 Jan 2011 19:47:56 +0000 (11:47 -0800)]
iwlagn: add 2000 series pci id

Add PCI ID supports for all 2000 series devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years ago iwlagn: 2000 series devices support
Wey-Yi Guy [Fri, 21 Jan 2011 23:47:21 +0000 (15:47 -0800)]
 iwlagn: 2000 series devices support

Adding 2000 series devices supports, the 2000 series devices has
many different SKUs which includes 1x1 and 2x2 devices,also with
and without BT combo.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: add 2000 series EEPROM version
Wey-Yi Guy [Sat, 8 Jan 2011 19:47:54 +0000 (11:47 -0800)]
iwlagn: add 2000 series EEPROM version

Adding EEPROM version for 2000 series devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove reference to gen2a and gen2b
Wey-Yi Guy [Sat, 8 Jan 2011 18:25:14 +0000 (10:25 -0800)]
iwlagn: remove reference to gen2a and gen2b

Since 6005, 6030 and 6150 series are offical released, remove the reference
to gen2x and use the product number instead.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: use mac80211 throughput trigger
Wey-Yi Guy [Fri, 21 Jan 2011 23:26:39 +0000 (15:26 -0800)]
iwlwifi: use mac80211 throughput trigger

Instead of keeping track of LED blink speed
in the driver, use the new mac80211 trigger
and link it up with an LED classdev that we
now register. This also allows users more
flexibility in how they want to have the LED
blink or not.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoath9k_hw: replace magic values in register writes with proper defines
Felix Fietkau [Fri, 21 Jan 2011 17:46:35 +0000 (18:46 +0100)]
ath9k_hw: replace magic values in register writes with proper defines

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Simplify loop when setting up channels
Bruno Randolf [Fri, 21 Jan 2011 03:19:52 +0000 (12:19 +0900)]
ath5k: Simplify loop when setting up channels

Simplify confusing code and get rid of an unnecessary variable.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove a bogus error message
Felix Fietkau [Thu, 20 Jan 2011 20:57:30 +0000 (21:57 +0100)]
ath9k: remove a bogus error message

When beacons are being added or removed for an interface, ieee80211_beacon_get
will sometimes not return a beacon. This is normal and should not result in
useless logspam.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Remove redundant sc->curband
Bruno Randolf [Wed, 19 Jan 2011 09:21:13 +0000 (18:21 +0900)]
ath5k: Remove redundant sc->curband

Remove sc->curband because the band is already stored in the current channel.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Remove unused sc->curmode
Bruno Randolf [Wed, 19 Jan 2011 09:21:08 +0000 (18:21 +0900)]
ath5k: Remove unused sc->curmode

sc->curmode is set but never used. Remove it and the helper function. Also the
ath5k_rate_update which is refered to in the comment does not exist (any more?)
so we don't need to setup the band in that place.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5: Remove unused CTL definitions
Bruno Randolf [Wed, 19 Jan 2011 09:21:02 +0000 (18:21 +0900)]
ath5: Remove unused CTL definitions

They are unused in ath5k and a more detailled definition is in
ath/regd_common.h.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Add 802.11j 4.9GHz channels to allowed channels
Bruno Randolf [Wed, 19 Jan 2011 09:20:57 +0000 (18:20 +0900)]
ath5k: Add 802.11j 4.9GHz channels to allowed channels

Add the 802.11j (20MHz channel width) channels to the allowed channels. This
still does not enable 802.11j in ath5k since these frequencies are out of the
configured range. A later patch will deal with that.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Rename ath5k_copy_channels
Bruno Randolf [Wed, 19 Jan 2011 09:20:47 +0000 (18:20 +0900)]
ath5k: Rename ath5k_copy_channels

Rename ath5k_copy_channels() to ath5k_setup_channels() - nothing is copied
here.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Use mac80211 channel mapping function
Bruno Randolf [Wed, 19 Jan 2011 09:20:36 +0000 (18:20 +0900)]
ath5k: Use mac80211 channel mapping function

Use mac80211 channel mapping function instead of own homegrown version.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Try more than one queue when scheduling new aggregate.
Ben Greear [Wed, 19 Jan 2011 01:30:00 +0000 (17:30 -0800)]
ath9k: Try more than one queue when scheduling new aggregate.

Try all xmit queues until the hardware buffers are full.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Add 'misc' file to debugfs, fix queue indexes.
Ben Greear [Mon, 17 Jan 2011 19:54:50 +0000 (11:54 -0800)]
ath9k: Add 'misc' file to debugfs, fix queue indexes.

Add a misc file to show hardware op-mode, irq setup,
number of various types of VIFs and more.

Also, previous patches were using the wrong xmit queue
indexes.  Change to use the internal ath9k indexes instead
of the mac80211 queue indexes.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: Extend channel to frequency mapping for 802.11j
Bruno Randolf [Mon, 17 Jan 2011 04:37:28 +0000 (13:37 +0900)]
cfg80211: Extend channel to frequency mapping for 802.11j

Extend channel to frequency mapping for 802.11j Japan 4.9GHz band, according to
IEEE802.11 section 17.3.8.3.2 and Annex J. Because there are now overlapping
channel numbers in the 2GHz and 5GHz band we can't map from channel to
frequency without knowing the band. This is no problem as in most contexts we
know the band. In places where we don't know the band (and WEXT compatibility)
we assume the 2GHz band for channels below 14.

This patch does not implement all channel to frequency mappings defined in
802.11, it's just an extension for 802.11j 20MHz channels. 5MHz and 10MHz
channels as well as 802.11y channels have been omitted.

The following drivers have been updated to reflect the API changes:
iwl-3945, iwl-agn, iwmc3200wifi, libertas, mwl8k, rt2x00, wl1251, wl12xx.
The drivers have been compile-tested only.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: Brian Prodoehl <bprodoehl@gmail.com>
Acked-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Restart xmit logic in xmit watchdog.
Ben Greear [Mon, 10 Jan 2011 07:11:52 +0000 (23:11 -0800)]
ath9k: Restart xmit logic in xmit watchdog.

The system can get into a state where the xmit queue
is stopped, but there are no packets pending, so
the queue will not be restarted.

Add logic to the xmit watchdog to attempt to restart
the xmit logic if this situation is detected.

Example 'dmesg' output:

ath: txq: f4e723e0 axq_qnum: 2, mac80211_qnum: 2 axq_link: f4e996c8 pending frames: 1 axq_acq empty: 1 stopped: 0 axq_depth: 0  Attempting to restart tx logic.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: More xmit queue debugfs information.
Ben Greear [Mon, 10 Jan 2011 07:11:50 +0000 (23:11 -0800)]
ath9k: More xmit queue debugfs information.

To try to figure out why xmit logic hangs.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Keep track of stations for debugfs.
Ben Greear [Mon, 10 Jan 2011 07:11:49 +0000 (23:11 -0800)]
ath9k: Keep track of stations for debugfs.

The stations hold the ath_node, which holds the tid
and other xmit logic structures.  In order to debug
stuck xmit logic, we need a way to print out the tid
state for the stations.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Add counters to distinquish AMPDU enqueues.
Ben Greear [Mon, 10 Jan 2011 07:11:48 +0000 (23:11 -0800)]
ath9k: Add counters to distinquish AMPDU enqueues.

Show counters for pkts sent directly to hardware and
those queued in software.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Ensure xmit makes progress.
Ben Greear [Mon, 10 Jan 2011 07:11:47 +0000 (23:11 -0800)]
ath9k: Ensure xmit makes progress.

If the txq->axq_q is empty, the code was breaking out
of the tx_processq logic without checking to see if it should
transmit other queued AMPDU frames (txq->axq_acq).

This patches ensures ath_txq_schedule is called.

This needs review.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Remove un-used member from ath_node.
Ben Greear [Mon, 10 Jan 2011 07:11:46 +0000 (23:11 -0800)]
ath9k: Remove un-used member from ath_node.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Add more information to debugfs xmit file.
Ben Greear [Mon, 10 Jan 2011 07:11:45 +0000 (23:11 -0800)]
ath9k: Add more information to debugfs xmit file.

Should help debug strange tx lockup type issues.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Initialize ah->hw
Ben Greear [Mon, 10 Jan 2011 07:11:44 +0000 (23:11 -0800)]
ath9k: Initialize ah->hw

Previous code left it NULL.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Show some live tx-queue values in debugfs.
Ben Greear [Mon, 10 Jan 2011 07:11:43 +0000 (23:11 -0800)]
ath9k: Show some live tx-queue values in debugfs.

I thought this might help track down stuck queues, etc.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Fix skb-copy failure debug message.
Ben Greear [Sat, 8 Jan 2011 18:30:54 +0000 (10:30 -0800)]
mac80211: Fix skb-copy failure debug message.

This particular error isn't about multicast.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: fix 4965 notification wait setup
Johannes Berg [Wed, 5 Jan 2011 00:22:03 +0000 (16:22 -0800)]
iwlwifi: fix 4965 notification wait setup

The notification wait support code is shared
between 4965 and other AGN devices, so 4965
also has to initialize the data structures
for it, otherwise it crashes.

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>
13 years agoiwlagn: return error if PAN disable timeout
Johannes Berg [Wed, 5 Jan 2011 00:22:02 +0000 (16:22 -0800)]
iwlagn: return error if PAN disable timeout

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>
13 years agoiwlagn: properly wait for PAN disable
Johannes Berg [Wed, 5 Jan 2011 00:22:01 +0000 (16:22 -0800)]
iwlagn: properly wait for PAN disable

Previously I hacked this with an msleep(300)
which was fine since we never had longer PAN
time slots, but now that we will have them I
need to fix that. Use the new notification
wait support to properly wait for the WIPAN
deactivation complete signal from the ucode.

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>
13 years agoiwlagn: add support for waiting for notifications
Johannes Berg [Wed, 5 Jan 2011 00:22:00 +0000 (16:22 -0800)]
iwlagn: add support for waiting for notifications

In order to implement waiting for notifications,
add a structure that captures the information,
and a list of such structures that will be
traversed when a command is received from the
ucode.

Use sparse checking to make sure calls to the
prepare/wait/cancel functions are always nested
correctly.

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>
13 years agoiwlagn: make iwl_rx_handle static
Johannes Berg [Wed, 5 Jan 2011 00:21:59 +0000 (16:21 -0800)]
iwlagn: make iwl_rx_handle static

It's not used or likely to be needed from other
files, so it can be static.

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>
13 years agortlwifi: Fix possible NULL dereference
Jesper Juhl [Fri, 21 Jan 2011 19:40:54 +0000 (13:40 -0600)]
rtlwifi: Fix possible NULL dereference

In drivers/net/wireless/rtlwifi/pci.c::_rtl_pci_rx_interrupt() we call
dev_alloc_skb(), which may fail and return NULL, but we do not check the
returned value against NULL before dereferencing the returned pointer.
This may lead to a NULL pointer dereference which means we'll crash - not
good.

In a separate call to dev_alloc_skb(), the debug level is changed so that
the failure message will always be logged.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: add missing ps wakeup/restore calls
Felix Fietkau [Fri, 21 Jan 2011 17:52:38 +0000 (18:52 +0100)]
ath9k: add missing ps wakeup/restore calls

There are several places where ath_reset() was called without proper
calls to ath9k_ps_wakeup/ath9k_ps_restore. To fix this, add those calls
directly to ath_reset and drop them from callers where it makes sense.

Also add them to the config callback around ath_update_txpow to fix a
crash that happens when the tx power changed before any vif is brought up.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: disabled PAPRD for AR9003
Luis R. Rodriguez [Fri, 21 Jan 2011 01:47:39 +0000 (17:47 -0800)]
ath9k_hw: disabled PAPRD for AR9003

AR9003's PAPRD was enabled prematurely, and is causing some
large discrepancies on throughput and network connectivity.
For example downlink (RX) throughput against an AR9280 AP
can vary widlely from 43-73 Mbit/s while disabling this
gets AR9382 (2x2) up to around 93 Mbit/s in a 2.4 GHz HT20 setup.

Cc: stable@kernel.org
Cc: Paul Shaw <paul.shaw@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: don't read sku information from EEPROM for 4965
Wey-Yi Guy [Thu, 20 Jan 2011 16:08:04 +0000 (08:08 -0800)]
iwlwifi: don't read sku information from EEPROM for 4965

For all the new devices, the sku information should read from EEPROM
but for legacy devices such as 4965, appearly the EEPROM does not
contain the necessary information. so skip the read from EEPROM
and go back to use software configuration.

Reported-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Tested-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoBluetooth: Fix race condition with conn->sec_level
Johan Hedberg [Wed, 19 Jan 2011 06:36:52 +0000 (12:06 +0530)]
Bluetooth: Fix race condition with conn->sec_level

The conn->sec_level value is supposed to represent the current level of
security that the connection has. However, by assigning to it before
requesting authentication it will have the wrong value during the
authentication procedure. To fix this a pending_sec_level variable is
added which is used to track the desired security level while making
sure that sec_level always represents the current level of security.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix authentication request for L2CAP raw sockets
Johan Hedberg [Wed, 19 Jan 2011 06:36:51 +0000 (12:06 +0530)]
Bluetooth: Fix authentication request for L2CAP raw sockets

When there is an existing connection l2cap_check_security needs to be
called to ensure that the security level of the new socket is fulfilled.
Normally l2cap_do_start takes care of this, but that function doesn't
get called for SOCK_RAW type sockets. This patch adds the necessary
l2cap_check_security call to the appropriate branch in l2cap_do_connect.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Create a unified auth_type evaluation function
Johan Hedberg [Wed, 19 Jan 2011 06:36:50 +0000 (12:06 +0530)]
Bluetooth: Create a unified auth_type evaluation function

The logic for determining the needed auth_type for an L2CAP socket is
rather complicated and has so far been duplicated in
l2cap_check_security as well as l2cap_do_connect. Additionally the
l2cap_check_security code was completely missing the handling of
SOCK_RAW type sockets. This patch creates a unified function for the
evaluation and makes l2cap_do_connect and l2cap_check_security use that
function.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix MITM protection requirement preservation
Johan Hedberg [Wed, 19 Jan 2011 06:36:49 +0000 (12:06 +0530)]
Bluetooth: Fix MITM protection requirement preservation

If an existing connection has a MITM protection requirement (the first
bit of the auth_type) then that requirement should not be cleared by new
sockets that reuse the ACL but don't have that requirement.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoRevert "Bluetooth: Update sec_level/auth_type for already existing connections"
Johan Hedberg [Wed, 19 Jan 2011 06:36:48 +0000 (12:06 +0530)]
Revert "Bluetooth: Update sec_level/auth_type for already existing connections"

This reverts commit 045309820afe047920a50de25634dab46a1e851d. That
commit is wrong for two reasons:

- The conn->sec_level shouldn't be updated without performing
authentication first (as it's supposed to represent the level of
security that the existing connection has)

- A higher auth_type value doesn't mean "more secure" like the commit
seems to assume. E.g. dedicated bonding with MITM protection is 0x03
whereas general bonding without MITM protection is 0x04. hci_conn_auth
already takes care of updating conn->auth_type so hci_connect doesn't
need to do it.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Never deallocate a session when some DLC points to it
Lukáš Turek [Wed, 5 Jan 2011 01:43:59 +0000 (02:43 +0100)]
Bluetooth: Never deallocate a session when some DLC points to it

Fix a bug introduced in commit 9cf5b0ea3a7f1432c61029f7aaf4b8b338628884:
function rfcomm_recv_ua calls rfcomm_session_put without checking that
the session is not referenced by some DLC. If the session is freed, that
DLC would refer to deallocated memory, causing an oops later, as shown
in this bug report: https://bugzilla.kernel.org/show_bug.cgi?id=15994

Signed-off-by: Lukas Turek <8an@praha12.net>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix leaking blacklist when unregistering a hci device
Johan Hedberg [Tue, 4 Jan 2011 10:08:50 +0000 (12:08 +0200)]
Bluetooth: Fix leaking blacklist when unregistering a hci device

The blacklist should be freed before the hci device gets unregistered.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: l2cap: fix misuse of logical operation in place of bitop
David Sterba [Fri, 14 Jan 2011 13:59:44 +0000 (14:59 +0100)]
Bluetooth: l2cap: fix misuse of logical operation in place of bitop

CC: Marcel Holtmann <marcel@holtmann.org>
CC: "Gustavo F. Padovan" <padovan@profusion.mobi>
CC: João Paulo Rechi Vita <jprvita@profusion.mobi>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: ath3k: reduce memory usage
Alexander Holler [Mon, 22 Nov 2010 20:09:01 +0000 (21:09 +0100)]
Bluetooth: ath3k: reduce memory usage

There is no need to hold the firmware in memory.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agomac80211: drop non-auth 3-addr data frames when running as a 4-addr station
Felix Fietkau [Tue, 18 Jan 2011 14:48:48 +0000 (15:48 +0100)]
mac80211: drop non-auth 3-addr data frames when running as a 4-addr station

When running as a 4-addr station against an AP that has the 4-addr VLAN
interface and the main 3-addr AP interface bridged together, sometimes
frames originating from the station were looping back from the 3-addr AP
interface, causing the bridge code to emit warnings about receiving frames
with its own source address.
I'm not sure why this is happening yet, but I think it's a good idea to
drop all frames (except 802.1x/EAP frames) that do not match the configured
addressing mode, including 4-address frames sent to a 3-address station.
User test reports indicate that the problem goes away with this patch.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: allow advertising correct maximum aggregate size
Johannes Berg [Tue, 18 Jan 2011 12:52:23 +0000 (13:52 +0100)]
mac80211: allow advertising correct maximum aggregate size

Currently, mac80211 always advertises that it may send
up to 64 subframes in an aggregate. This is fine, since
it's the max, but might as well be set to zero instead
since it doesn't have any information.

However, drivers might have that information, so allow
them to set a variable giving it, which will then be
used. The default of zero will be fine since to the
peer that means we don't know and it will just use its
own limit for the buffer size.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: track receiver's aggregation reorder buffer size
Johannes Berg [Tue, 18 Jan 2011 12:51:05 +0000 (13:51 +0100)]
mac80211: track receiver's aggregation reorder buffer size

The aggregation code currently doesn't implement the
buffer size negotiation. It will always request a max
buffer size (which is fine, if a little pointless, as
the mac80211 code doesn't know and might just use 0
instead), but if the peer requests a smaller size it
isn't possible to honour this request.

In order to fix this, look at the buffer size in the
addBA response frame, keep track of it and pass it to
the driver in the ampdu_action callback when called
with the IEEE80211_AMPDU_TX_OPERATIONAL action. That
way the driver can limit the number of subframes in
aggregates appropriately.

Note that this doesn't fix any drivers apart from the
addition of the new argument -- they all need to be
updated separately to use this variable!

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: don't return beacons when mesh is disabled
Johannes Berg [Tue, 18 Jan 2011 12:45:32 +0000 (13:45 +0100)]
mac80211: don't return beacons when mesh is disabled

When mesh is disabled, mac80211 was returning
beacons with an empty mesh ID. That isn't
desirable, even if drivers shouldn't be trying
to get beacons to start with.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Fix up hardware mode and beacons with multiple vifs.
Ben Greear [Sat, 15 Jan 2011 19:13:48 +0000 (19:13 +0000)]
ath9k: Fix up hardware mode and beacons with multiple vifs.

When using a mixture of AP and Station interfaces,
the hardware mode was using the type of the
last VIF registered.  Instead, we should keep track
of the number of different types of vifs and set the
mode accordingly.

In addtion, use the vif type instead of hardware opmode
when dealing with beacons.

Attempt to move some of the common setup code into smaller
methods so we can re-use it when changing vif mode as
well as adding/deleting vifs.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix excessive BAR sending when a frame exceeds its retry limit
Felix Fietkau [Sat, 15 Jan 2011 13:30:15 +0000 (14:30 +0100)]
ath9k: fix excessive BAR sending when a frame exceeds its retry limit

Because the sendbar variable was not reset to zero, the stack would send
Block ACK requests for all subframes following the one that failed, which
could mess up the receiver side block ack window.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: try more than one tid when scheduling a new aggregate
Felix Fietkau [Sat, 15 Jan 2011 13:30:14 +0000 (14:30 +0100)]
ath9k: try more than one tid when scheduling a new aggregate

Sometimes the first TID in the first AC's list is not available for forming
a new aggregate (the BAW might not allow it), however other TIDs may have
data available for sending.
Prevent a slowdown of other TIDs by going through multiple entries until
we've either hit the last one or enough AMPDUs are pending in the hardware
queue.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: fix carrier leakage calibration for AR9271
Rajkumar Manoharan [Fri, 14 Jan 2011 20:12:01 +0000 (01:42 +0530)]
ath9k_hw: fix carrier leakage calibration for AR9271

AR9285 carrier leakage calibration related workaround on high
temperature is not applicable for AR9271.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: keep calibrated noise floor value for oper channel
Rajkumar Manoharan [Fri, 14 Jan 2011 20:03:28 +0000 (01:33 +0530)]
ath9k_htc: keep calibrated noise floor value for oper channel

The ath9k_hw assumes that caldata is valid only for
oper channel. But with ath9k_htc case, the caldata is
passed for all channels on hw_reset though we are not doing
calibration on that channel. So the oper channel's nf history
got cleared to default due to mismatch in channel flags.
This patch also saves some space.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: preserve caldata history buffer across scanning
Rajkumar Manoharan [Fri, 14 Jan 2011 19:31:22 +0000 (01:01 +0530)]
ath9k: preserve caldata history buffer across scanning

caldata's channel info is never filled with operating channel
info which is causing the operating channel's noise floor
history buffer is reset to default nf during channel change.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Show max retry-counts in kernel messages.
Ben Greear [Fri, 14 Jan 2011 17:32:18 +0000 (09:32 -0800)]
mac80211: Show max retry-counts in kernel messages.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: mesh only parameter mppath maybe unused
Wey-Yi Guy [Fri, 14 Jan 2011 16:07:56 +0000 (08:07 -0800)]
mac80211: mesh only parameter mppath maybe unused

mppath is mesh related parameter and maybe unused

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: partially revert "fix dma descriptor rx error bit parsing"
Felix Fietkau [Thu, 13 Jan 2011 23:06:27 +0000 (00:06 +0100)]
ath9k_hw: partially revert "fix dma descriptor rx error bit parsing"

The rx error bit parsing was changed to consider PHY errors and various
decryption errors separately. While correct according to the documentation,
this is causing spurious decryption error reports in some situations.

Fix this by restoring the original order of the checks in those places,
where the errors are meant to be mutually exclusive.

If a CRC error is reported, then MIC failure and decryption errors
are irrelevant, and a PHY error is unlikely.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: add hw configuration for max ampdu buffer size
Luciano Coelho [Wed, 12 Jan 2011 13:26:30 +0000 (15:26 +0200)]
mac80211: add hw configuration for max ampdu buffer size

Some devices don't support the maximum AMDPU buffer size of 64, so we
need to add an option to configure this in the hardware configuration.
This value will be used in the ADDBA response instead of the value
suggested in the request, if the latter is greater than the max
supported.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Tested-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211:mesh_mpp_table_grow call should depend on MESH_WORK_GROW_MPP_TABLE flag.
Nick Ledovskikh [Tue, 11 Jan 2011 14:35:12 +0000 (14:35 +0000)]
mac80211:mesh_mpp_table_grow call should depend on MESH_WORK_GROW_MPP_TABLE flag.

Replace MESH_WORK_GROW_MPATH_TABLE by MESH_WORK_GROW_MPP_TABLE in
mesh_mpp_table_grow call condition.

(Clearly the original was a typo... -- JWL)

Signed-off-by: Nickolay Ledovskikh <nledovskikh@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Fix return codes for eeprom read functions.
Wojciech Dubowik [Tue, 11 Jan 2011 08:00:31 +0000 (09:00 +0100)]
ath5k: Fix return codes for eeprom read functions.

Eeprom read functions are of bool type and not int.

Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: reduce the likelihood of baseband hang check false positives
Felix Fietkau [Tue, 11 Jan 2011 00:05:50 +0000 (17:05 -0700)]
ath9k: reduce the likelihood of baseband hang check false positives

Since baseband hangs are rare, but the hang check function has a high
false positive rate in some situations, we need to add more reliable
indicators.

In AP mode we can use blocked beacon transmissions as an indicator,
they should be rare enough.

In station mode, we can skip the hang check entirely, since a true
hang will trigger beacon loss detection, and mac80211 will rescan,
which leads to a hw reset that will bring the hardware back to life.

To make this more reliable, we need to skip fast channel changes
if the hardware appears to be stuck.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: reinitialize block ack window data when starting aggregation
Felix Fietkau [Tue, 11 Jan 2011 00:05:49 +0000 (17:05 -0700)]
ath9k: reinitialize block ack window data when starting aggregation

There might be some old stale data left, which could confuse tracking
of pending tx frames.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix initial sequence number after starting an ampdu session
Felix Fietkau [Tue, 11 Jan 2011 00:05:48 +0000 (17:05 -0700)]
ath9k: fix initial sequence number after starting an ampdu session

txtid->seq_start may not always be up to date, when there is HT non-AMPDU
traffic just before starting an AMPDU session. Relying on txtid->seq_next
is better, since it is also used to generate the sequence numbers for
all QoS data frames.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix bogus sequence number increases on aggregation tid flush
Felix Fietkau [Tue, 11 Jan 2011 00:05:47 +0000 (17:05 -0700)]
ath9k: fix bogus sequence number increases on aggregation tid flush

When a tid pointer is passed to ath_tx_send_normal(), it increases the
starting sequence number for the next AMPDU action frame, which should
only be done if the sequence number assignment is fresh. In this case
it is clearly not.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix and fine-tune rf registers for RT3070/RT3071/RT3090
RA-Jay Hung [Mon, 10 Jan 2011 10:28:10 +0000 (11:28 +0100)]
rt2x00: Fix and fine-tune rf registers for RT3070/RT3071/RT3090

Basically fix and fine-tune RT3070/RT3071/RT3090 chip RF initial value
when call rt2800_init_rfcsr

Signed-off-by: RA-Jay Hung <jay_hung@ralinktech.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix radio off hang issue for PCIE interface
RA-Jay Hung [Mon, 10 Jan 2011 10:27:43 +0000 (11:27 +0100)]
rt2x00: Fix radio off hang issue for PCIE interface

PCI/PCIE radio off behavior is different from SOC/USB.
They mainly use MCU command to disable DMA, TX/RX and enter power saving mode.

Signed-off-by: RA-Jay Hung <jay_hung@ralinktech.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Rewrote code for checking if destinations are proxied.
Joel A Fernandes [Mon, 10 Jan 2011 06:44:23 +0000 (00:44 -0600)]
mac80211: Rewrote code for checking if destinations are proxied.

Rewrote code for checking if the destination is proxied by a mesh portal, to facilitate better
understanding of the functionality.

Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com>
Acked-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Offload USB eeprom reading to target
Sujith Manoharan [Tue, 4 Jan 2011 07:47:28 +0000 (13:17 +0530)]
ath9k_hw: Offload USB eeprom reading to target

For USB devices, reading the EEPROM data can be offloaded
to the target. Use multiple register reads to take advantage
of this feature to reduce initialization time.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add multiple register read API
Sujith Manoharan [Tue, 4 Jan 2011 07:47:18 +0000 (13:17 +0530)]
ath9k_htc: Add multiple register read API

This would decrease latency in reading bulk registers.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>