summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/carl9170/main.c
AgeCommit message (Collapse)Author
2011-10-03carl9170: Fix mismatch in carl9170_op_set_key mutex lock-unlockAlexey Khoroshilov
commit 66cb54bd24086b2d871a03035de9b0e79b2b725e upstream. If is_main_vif(ar, vif) reports that we have to fall back to software encryption, we goto err_softw; before locking ar->mutex. As a result, we have unprotected call to carl9170_set_operating_mode and unmatched mutex_unlock. The patch fix the issue by adding mutex_lock before goto. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Acked-By: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-16carl9170: advertise interface combinationsChristian Lamparter
In order to provide multiple interfaces for a single device, the driver will be required to advertise all possible interface configurations to the stack. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-05carl9170: fix allmulticast modeNicolas Cavallari
Currently, the driver only disable multicast filtering when the FIF_ALLMULTI driver flag has been just set (ie, if changed_flags& FIF_ALLMULTI and *new_flags& FIF_ALLMULTI) or else it will reenable multicast filtering. But next time, this condition will be false and multicast filtering will be reenabled, even through FIF_ALLMULTI is still set. This mean that allmulticast only works for less than two minutes in ad-hoc mode. This patch fixes that to disable multicast filtering as long as FIF_ALLMULTI is set. Signed-off-by: Nicolas Cavallari <cavallar@lri.fr> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26carl9170: improve unicast PS bufferingChristian Lamparter
Using the ieee80211_sta_block allows the PS code to handle awake->doze->awake transitions of our clients in a race-free manner. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-03-29carl9170: Fix tx aggregation problems with some clientsChristian Lamparter
Some clients seem to rely upon the reception of BlockAckReqs to flush their rx reorder buffer. In order to fix aggregation for these clients carl9170 should set IEEE80211_TX_STAT_AMPDU_NO_BACK to generate a BlockAckReq if the transmission of an AMPDU subframe fails. This fixes aggregation problems with Intel 5100 Windows STAs (and maybe others as well). Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-27carl9170: utilize fw seq counter for mgmt/non-QoS data framesChristian Lamparter
"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>
2011-01-19mac80211: track receiver's aggregation reorder buffer sizeJohannes Berg
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>
2010-12-08Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/ath/ath9k/ar9003_eeprom.c net/llc/af_llc.c
2010-11-29ath9k/carl9170: advertise P2PJohannes Berg
With some upcoming changes we'd like to use the interface types for P2P capability tests. Enable them now so that when we add those tests in wpa_supplicant, nothing will break. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-24Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
2010-11-22carl9170: fix virtual interface setup crashChristian Lamparter
This patch fixes a faulty bound check which caused a crash when too many virtual interface were brought up. BUG: unable to handle kernel NULL pointer dereference at 00000004 IP: [<f8125f67>] carl9170_op_add_interface+0x1d7/0x2c0 [carl9170] *pde = 00000000 Oops: 0002 [#1] PREEMPT Modules linked in: carl9170 [...] Pid: 4720, comm: wpa_supplicant Not tainted 2.6.37-rc2-wl+ EIP: 0060:[<f8125f67>] EFLAGS: 00210206 CPU: 0 EIP is at carl9170_op_add_interface+0x1d7/0x2c0 [carl9170] EAX: 00000000 ... Process wpa_supplicant Stack: f4f88f34 fffffff4 .. Call Trace: [<f8f4e666>] ? ieee80211_do_open+0x406/0x5c0 [mac80211] [...] Code: <89> 42 04 ... EIP: [<f8125f67>] carl9170_op_add_interface+0x1d7/0x2c0 [carl9170] CR2: 0000000000000004 Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15carl9170: fix spurious restart due to high latencyChristian Lamparter
RX Stress tests of unidirectional bulk traffic with bitrates of up to 220Mbit/s have revealed that the fatal-event recovery logic [which was solely triggered by an out-of-rx-buffer situation] is too aggressive. The new method now "pings" the device and then decides - based on the response - whenever a restart is needed or not. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15carl9170: fix typosHauke Mehrtens
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-10-25carl9170: fix scheduling while atomicChristian Lamparter
This patch fixes the following mishap: BUG: scheduling while atomic: wpa_supplicant/4164/0x00000002 Modules linked in: carl9170 mac80211 [...] Pid: 4164, comm: wpa_supplicant Not tainted 2.6.36-wl+ #119 Call Trace: [<c13779a9>] ? schedule+0x349/0x4c0 [<c13780d6>] ? schedule_timeout+0x106/0x1e0 [<c1037f50>] ? process_timeout+0x0/0x10 [<c1377e8d>] ? wait_for_common+0x9d/0x140 [<c1029110>] ? default_wake_function+0x0/0x10 [<f80c6080>] ? carl9170_exec_cmd+0xf0/0x250 [carl9170] [<f80c695e>] ? carl9170_set_mac_reg+0x5e/0x70 [carl9170] [<f80c3f76>] ? carl9170_op_add_interface+0x176/0x310 [carl9170] [...] rcu_read_unlock() call was erroneously placed after the sync. function carl9170_mod_virtual_mac. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-10-05carl9170: support firmware-based rx filterChristian Lamparter
The hardware rx-filter was essentially disabled, because of a serve, yet unidentifiable problem with iwlagn. Due to these circumstances the driver and mac80211 were left with the job of filtering. This is very unfortunate and has proven to be expensive in terms of latency, memory and load. Therefore the new 1.8.8.3 firmware introduces a flexible filtering infrastructure which allows the driver to offload some of the checks (FCS & PLCP crc check, RA match, control frame filter, etc...) whenever possible. Note: This patch also includes all changes to the shared headers files since the inclusion. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-09-28carl9170: fix WARN_ON triggered by Broadcom HT STAsChristian Lamparter
Broadcom's Windows driver for the 4313 advertises an ampdu density of 7 => 16 us. The AR9170 MAC on the other hand only supports densities up to 8 us. This patch removes the noisy WARN_ON, because there is nothing we can do about it. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-09-28carl9170: fix tx_ampdu_upload counterChristian Lamparter
tx_ampdu_upload was not decreased when an a-MPDU frame had to be kicked out from the tx_pending queues. This broke ampdu aggregation, because the scheduler waits until tx_ampdu_upload drops to zero, before making the next aggregate. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-09-28carl9170: remove non-standard ba session teardownChristian Lamparter
802.11n-2009 demands in 11.2.1: " When a STA enters normal (non-APSD) PS mode, any downlink Block ACK agreement without an associated schedule is suspended for the duration of this PS mode." The operative word is "suspended" and not terminated. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-09-21carl9170: fix hang in AP mode when HT STA does PSMChristian Lamparter
This is a obvious bug, skb_queue_walk does not work if the iterator gets removed from the queue. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-09-14carl9170: mac80211 glue and command interfaceChristian Lamparter
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>