summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/carl9170
Commit message (Collapse)AuthorAgeFilesLines
* carl9170: Use static constJoe Perches2010-11-221-1/+1
| | | | | | | | | | | | Using static const generally increases object text and decreases data size. It also generally decreases overall object size. text data bss dec hex filename 1897 56 672 2625 a41 drivers/net/wireless/ath/carl9170/cmd.o.new 1897 56 672 2625 a41 drivers/net/wireless/ath/carl9170/cmd.o.old Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix init-self regressionChristian Lamparter2010-11-221-1/+1
| | | | | | | | | | The commit: "carl9170: tx path review" introduced a regression. gcc (with -Winit-self): tx.c:1264: warning: ‘super’ is used uninitialized in this function Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: use generic sign_extend32Christian Lamparter2010-11-151-13/+4
| | | | | | | | | This patch replaces the handcrafted sign extension cruft with a generic bitop function. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: tx path reviewChristian Lamparter2010-11-151-13/+13
| | | | | | | | | | | | | | | | | | This patch fixes a few shortcomings in the tx path. * move temp. ampdu_[ack]_len out of txinfo->pad. * fix WARN_ON from tx.c:line 300 when tx_ampdu_queue fails to queue the frame. * In tx_prepare, we already have a local pointer to the station's ieee80211_sta struct. * remove a second !sta check, tx_prepare already takes care of that. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: configurable beacon ratesChristian Lamparter2010-11-151-20/+32
| | | | | | | | | | | | | | Previously, the beacon rate was fixed to either: * 1Mb/s [2.4GHz band] * 6Mb/s [5GHz band] This limitation has been addressed and now the beacon rate is selected by ieee80211_tx_info's rate control info, almost like any ordinary data frame. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: stop stale uplink BA sessionsChristian Lamparter2010-11-151-0/+54
| | | | | | | | | | | | | | | | This patch fixes a possible lengthy stall if the device is operating as an experimental 11n AP and an STA [during heavy txrx action] suddenly signalized to go off-channel (old NetworkManager), or (sleep - which is unlikely, because then it wouldn't be *active* at all!?). Because the driver has to manage the BA Window, the sudden PSM transition can leave active uplink BA sessions to the STA in a bad state and a proper cleanup is needed. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix spurious restart due to high latencyChristian Lamparter2010-11-153-2/+20
| | | | | | | | | | | | | | 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>
* carl9170: initialize HW aMPDU parameters properlyChristian Lamparter2010-11-151-2/+2
| | | | | | | | This patch changes the initial aMPDU density and factor settings to match those of Otus. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: import hw/fw header updatesChristian Lamparter2010-11-154-20/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch imports all shared header changes from carl9170fw.git. * add some strategic __aligned(4). This allows the compiler generate optimized code for architectures which can't access (unaligned/packed) data efficiently. ("ath9k_hw: optimize all descriptor access functions") * add a forgotten __CARL9170FW__ ifdef around a private firmware-internal struct. * GET_VAL macro helper Very useful for extracting data out of the bit-packed PHY registers. * cosmetic changes e.g.: _CCA_MINCCA_ to just _CCA_MIN_. * version bump 1.8.8.3 -> 1.9.0. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix typosHauke Mehrtens2010-11-152-2/+2
| | | | | | 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>
* carl9170: fix scheduling while atomicChristian Lamparter2010-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* carl9170: fix memory leak issue in async cmd macro wrappersChristian Lamparter2010-10-251-23/+28
| | | | | | | | | | | | | | This patch continues where the previous commit: "carl9170: fix async command buffer leak" left off. Similar to carl9170_reboot/carl9170_powersave, the carl9170_async_regwrite* macros would leak the temporary command buffer, if __carl9170_exec_cmd fails to upload the command to the device. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix async command buffer leakChristian Lamparter2010-10-251-6/+19
| | | | | | | | | | If __carl9170_exec_cmd fails to upload an asynchronous command to the device, the functions: carl9170_reboot and carl9170_powersave will leak the temporary command assembly buffer. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: A-MPDU frame type filterChristian Lamparter2010-10-111-1/+41
| | | | | | | | | | | | | | | | In the past, carl9170 has been plagued by mysterious ghosts. e.g.: wlan4: deauthenticated from 02:04:d8:3c:ac:c1 (Reason: 0) Apparently, the AP sent us a bogus deauthentication notification. But upon closer inspection the "management frame" turned out to be a corrupted scrap of an unsuccessful A-MPDU. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: remove stale rx error pathChristian Lamparter2010-10-112-6/+11
| | | | | | | | | | | | | | The total/fatal error bit was erroneously prefixed with AR9170_RX_ERROR instead of AR9170_RX_STATUS. Luckily, the hardware specification confirmed that the 0x80 flag will never be set for mac->error. So, it was always just a dead branch. This patch also imports the latest version of shared wlan.h header from the firmware git. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: common error path for bad framesChristian Lamparter2010-10-111-28/+20
| | | | | | | | This patch replaces several identical frame drop paths with a single shared rx frame error handler. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: support firmware-based rx filterChristian Lamparter2010-10-059-10/+75
| | | | | | | | | | | | | | | | | | | | | | 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>
* carl9170: interrupt urbs must not set URB_ZERO_PACKETChristian Lamparter2010-09-281-2/+0
| | | | | | | | | | | | | This patch fixes a bug in the driver which was exposed by CONFIG_USB_DEBUG: "usb 1-1.6.3: BOGUS urb flags, 40 --> 0" The transfer flag "URB_ZERO_PACKET" is only valid for bulk urbs. Reported-by: André Erdmann Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: revamp carl9170_tx_prepareChristian Lamparter2010-09-281-80/+75
| | | | | | | | | | | | | | | David Miller complained about the driver's excessive use of variables in __packed structs. While I did not fully agree with his sole "performance" argument on all accounts. I do see some room for improvement in hot-paths on architectures without an efficient access to unaligned elements. This first patch (dare I say?) optimizes an important tx hot-path in the driver: carl9170_tx_prepare. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix WARN_ON triggered by Broadcom HT STAsChristian Lamparter2010-09-281-1/+1
| | | | | | | | | | | | 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>
* carl9170: fix tx_ampdu_upload counterChristian Lamparter2010-09-281-1/+14
| | | | | | | | | | | | | 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>
* carl9170: remove lost-frame workaroundChristian Lamparter2010-09-283-40/+2
| | | | | | | | | | | | | | | | This patch removes some cruft, which survived the RFC review phase. Originally, carl9170_tx_ampdu_queue erroneously dropped a lot of frames. As a result the ampdu scheduler bogged down quite frequently and the affected BA session timed out. However this bug has been fixed and the WA and its debugfs counter is no longer useful. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: angle brackets for wiki linkChristian Lamparter2010-09-281-1/+1
| | | | | | | | | "The convention seems to be angle brackets around URLS in Kconfig." -- Finn Thain (to update web addresses in the kernel) Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: remove non-standard ba session teardownChristian Lamparter2010-09-281-3/+0
| | | | | | | | | | | | 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>
* carl9170: fix hang in AP mode when HT STA does PSMChristian Lamparter2010-09-211-2/+2
| | | | | | | | 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>
* carl9170: reinit phy after HT settings have changedChristian Lamparter2010-09-212-12/+14
| | | | | | | | | | The driver has a set of different initvals for 20 MHz vs dynamic HT2040 operation. Because we can't change some of the registers "in-flight", the driver needs to perform a warm reset. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix state downgrade during resetChristian Lamparter2010-09-211-2/+0
| | | | | | | | | | | | | | Don't mark the device as completely dead just yet. If all goes to plan and carl9170_reboot succeeds then we can skip the expensive userspace-driven reinitialization anyway. And if it doesn't and carl9170_reboot fails, then carl9170_usb_cancel_urbs will do the necessary steps. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: abort tasklet during usb resetChristian Lamparter2010-09-211-0/+3
| | | | | | | | | This patch prevents the tasklet code from interfering while the firmware is down for an unscheduled maintenance. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: don't load bogus nf of chain 1Christian Lamparter2010-09-213-12/+9
| | | | | | | According to Atheros, chain 1 is not connected. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix noise dBm conversionChristian Lamparter2010-09-211-2/+2
| | | | | | | | | | | | | | Ever since carl9170 gained support to read the noisefloor, the reported noisefloor level was pretty poor. Initially I assumed that something was wrong in the PHY setup and it would be impossible to fix without any guidances. But this was not the case. In fact the nf readings were correct and the thing that was broken was the "simple" sign extension code! Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: use rx chainmask from eepromChristian Lamparter2010-09-211-1/+4
| | | | | | | | The eeprom provides a mask for all present rx chains. Why not use it instead of the generic initval default? Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: update AR9170 phy initvalsChristian Lamparter2010-09-211-3/+5
| | | | | | | | | | | | This patch is loosely based on an ath9k patch called: "ath9k_hw: sync initvals for ar9001 and ar9002 with Atheros" It includes the following changes/fixes: - AGC setting improvements - timing changes for improved performance Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: Makefile, Kconfig files and MAINTAINERSChristian Lamparter2010-09-142-0/+45
| | | | | Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: firmware parser and debugfs codeChristian Lamparter2010-09-143-0/+1437
| | | | | Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: 802.11 rx/tx processing and usb backendChristian Lamparter2010-09-143-0/+3419
| | | | | Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: PHY/RF and MAC routinesChristian Lamparter2010-09-142-0/+2409
| | | | | Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: Register maps, tx/rx descriptor formats and eeprom layoutChristian Lamparter2010-09-146-0/+2436
| | | | | Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: mac80211 glue and command interfaceChristian Lamparter2010-09-146-0/+3024
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud