Felix Fietkau [Mon, 24 Jan 2011 18:23:15 +0000 (19:23 +0100)]
ath9k: remove the virtual wiphy debugfs interface
It does not make much sense to keep the current virtual wiphy implementation
any longer - it adds significant complexity, has very few users and is still
very experimental. At some point in time, it will be replaced by a proper
implementation in mac80211.
By making the code easier to read and maintain, removing virtual wiphy support
helps with fixing the remaining driver issues and adding further improvements.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Mon, 24 Jan 2011 18:23:14 +0000 (19:23 +0100)]
ath9k: clean up the code that wakes the mac80211 queues
Instead of spreading ath_wake_mac80211_queue() calls over multiple places
in the tx path that process the tx queue for completion, call it only
where the pending frames counter gets decremented, eliminating some
redundant checks.
To prevent queue draining from waking the queues prematurely (e.g. during
a hardware reset), reset the queue stop state when draining all queues,
as the caller in main.c will run ieee80211_wake_queues(hw) anyway.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Mon, 24 Jan 2011 18:11:54 +0000 (19:11 +0100)]
ath9k: fix misplaced debug code
The commit 'ath9k: Add more information to debugfs xmit file.' added more
debug counters to ath9k and also added some lines of code to ath9k_hw.
Since ath9k_hw is also used by ath9k_htc, its code must not depend on ath9k
data structures. In this case it was not fatal, but it's still wrong, so
the code needs to be moved back to ath9k.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
carl9170: utilize fw seq counter for mgmt/non-QoS data frames
"mac80211 will properly assign sequence numbers to QoS-data
frames but cannot do so correctly for non-QoS-data and
management frames because beacons need them from that counter
as well and mac80211 cannot guarantee proper sequencing."
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 26 Jan 2011 08:22:15 +0000 (09:22 +0100)]
mac80211: use DECLARE_EVENT_CLASS
For events that include only the local struct as
their parameter, we can use DECLARE_EVENT_CLASS
and save quite some binary size across segments
as well lines of code.
text data bss dec hex filename
375745 19296 916 395957 60ab5 mac80211.ko.before
367473 17888 916 386277 5e4e5 mac80211.ko.after
-8272 -1408 0 -9680 -25d0 delta
Some more tracepoints with identical arguments
could be combined like this but for now this is
the one that benefits most.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bruno Randolf [Wed, 19 Jan 2011 09:20:52 +0000 (18:20 +0900)]
ath5k: ath5k_setup_channels cleanup and whitespace
Remove useless test_bit - it's not going to happen because of the way this
function is called only when that bit is set.
And fix some whitespace.
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>
ath9k_hw: read and backup AR_WA register value even before chip reset on.
We need to read and backup AR_WA register value permanently and reading
this after the chip is awakened results in this register being zeroed out.
This seems to fix the ASPM with L1 enabled issue that we have observed.
The laptop becomes very slow and hangs mostly with ASPM L1 enabled without
this fix.
Cc: Stable Kernel <stable@kernel.org> Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k_hw: Fix incorrect macversion and macrev checks
There are few places where we are checking for macversion and revsions
before RTC is powered ON. However we are reading the macversion and
revisions only after RTC is powered ON and so both macversion and
revisions are actully zero and this leads to incorrect srev checks
Incorrect srev checks can cause registers to be configured wrongly and can
cause unexpected behavior. Fixing this seems to address the ASPM issue that
we have observed. The laptop becomes very slow and hangs mostly with ASPM L1
enabled without this fix.
fix this by reading the macversion and revisisons even before we start
using them. There is no reason why should we delay reading this info
until RTC is powered on as this is just a register information.
Cc: Stable Kernel <stable@kernel.org> Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Juuso Oikarinen [Mon, 24 Jan 2011 06:01:54 +0000 (07:01 +0100)]
wl12xx: Increase scan channel dwell time for passive scans
The passive scan channel dwell time currently used is 30-60TU. A typical
beacon interval for AP's is 100TU. This leads to a ~30% worst-case probability
of finding an AP via passive scanning.
For 5GHz bands for DFS frequencies passive scanning is the only scanning
option. Hence for these, the probability of finding an AP is very low.
To fix this, increase the passive channel scan dwell times (also the early
leave value, as 5GHz channels are still typically very silent.) Use a value
of 100TU, because that covers most typical AP configurations.
Based on testing the probability of finding an AP (100TU beacon interval) on
a single scan round are as follows (based on 100 iterations):
Levi, Shahar [Sun, 23 Jan 2011 06:27:22 +0000 (07:27 +0100)]
wl12xx: BA initiator support
Add 80211n BA initiator session support wl1271 driver.
Include BA supported FW version auto detection mechanism.
BA initiator session management included in FW independently.
Signed-off-by: Shahar Levi <shahar_levi@ti.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Juuso Oikarinen [Fri, 14 Jan 2011 11:48:46 +0000 (12:48 +0100)]
wl12xx: Cleanup PLT mode when module is removed
PLT mode start/stop is controlled from userspace. When removing module, the
PLT mode state is however not checked, and not cleared. There is the possibility
of some unwanted state to left linger and there is even the possiblity of a
kernel crash if for instance IRQ work is running when the module is removed.
Fix this by stopping PLT mode on module removal, if still running.
Luciano Coelho [Wed, 12 Jan 2011 13:27:03 +0000 (14:27 +0100)]
wl12xx: add hw configuration for max supported AMDPU size
The wl12xx chips do the AMDPU aggregation work in the firmware, but it
supports a maximum of 8 frames per block. Configure the mac80211 hw
structure accordingly.
changed the visibility of the debug_level module parameter
in the filesystem to be readable and writable to the root user.
It is now accessible under /sys/module/wl12xx/parameters
removed the debug_level debugfs file that was created under
/sys/kernel/debug/...
Signed-off-by: Guy Eilam <guy@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Tue, 11 Jan 2011 17:25:18 +0000 (18:25 +0100)]
wl12xx: don't modify the global supported band structures
When 11a is not supported, we were modifying the global structure that
contains the bands supported by the driver. This causes problems when
having more one wl12xx device in the same system because they all use
the same global. This also causes problems when the wl12xx_sdio
module is removed and the wl12xx module remains.
Fix this problem by copying the band structure into the wl12xx
instance.
Eliad Peller [Sun, 26 Dec 2010 08:27:50 +0000 (09:27 +0100)]
wl12xx: don't join upon disassociation
wl12xx "rejoins" upon every BSS_CHANGED_BSSID notification.
However, there is no need to rejoin after disassociation, so just
filter out the case when the new bssid is 00:00:00:00:00:00.
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.
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.
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.
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.
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
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)
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>