Johannes Berg [Wed, 21 Apr 2010 08:25:36 +0000 (10:25 +0200)]
radiotap parser: fix endian annotation
When I updated this from the corresponding
userspace library, an annotation error crept
in -- this variable needs to be annotated as
little endian. No effect on code generation.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Tue, 20 Apr 2010 22:28:36 +0000 (18:28 -0400)]
ath9k_hw: make all AR9002 initvals use u32
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Tue, 20 Apr 2010 22:28:35 +0000 (18:28 -0400)]
ath9k_hw: make two initvals consto for the AR9001 family
This makes ar5416Addac_9160 and ar5416Addac_9160 const
I guess we skipped them long ago.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Juuso Oikarinen [Tue, 20 Apr 2010 10:15:56 +0000 (13:15 +0300)]
mac80211: Fix ieee80211_sta_conn_mon_timer with hw connection monitoring
When IEEE80211_HW_CONNECTION_MONITOR is configured by the driver, starting
of ieee80211_sta_conn_mon_timer should be prevented, as it is then not needed.
This is currently partially the case. As it seems, when a probe-response is
received from the AP the timer is still restarted, thus restarting the host
based connection keep-alive mechanism. These probe-responses happen at least
when scanning while associated.
Fix this by preventing starting of the ieee80211_sta_conn_mon_timer in the
ieee80211_rx_mgmt_probe_resp function.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Mon, 19 Apr 2010 17:57:37 +0000 (19:57 +0200)]
ath9k: set the STBC flag in rate control if the peer supports it
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Mon, 19 Apr 2010 17:57:36 +0000 (19:57 +0200)]
ath9k: add support for Tx and Rx STBC
Supported only for single stream rates by the hardware
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Mon, 19 Apr 2010 17:57:35 +0000 (19:57 +0200)]
mac80211: add flags for STBC (Space-Time Block Coding)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Mon, 19 Apr 2010 17:57:34 +0000 (19:57 +0200)]
ath9k: initialize the number of tx/rx streams correctly
AR9300 based hardware can 3x3 MCS rates, this should be set in the
HT capabilities.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Mon, 19 Apr 2010 17:57:33 +0000 (19:57 +0200)]
ath9k: reduce the bits_per_symbol table size, support more streams
Instead of increasing bits_per_symbol for supporting more streams, keep
it single-stream only and multiply the values by the numer of streams.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Mon, 19 Apr 2010 17:57:32 +0000 (19:57 +0200)]
ath9k: update the ath_max_4ms_framelen table
Include MCS0-31 and also add SGI for HT20. This makes it
possible to support more different rate combinations with
newer hardware.
Based on a patch by Selvam. T.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Mon, 19 Apr 2010 17:57:31 +0000 (19:57 +0200)]
ath9k: update the MCS mask for MCS16 and above
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Mon, 19 Apr 2010 17:57:30 +0000 (19:57 +0200)]
ath9k: clean up tx buffer handling
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Mon, 19 Apr 2010 17:57:29 +0000 (19:57 +0200)]
ath9k: check for specific rx stuck conditions and recover from them
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Tue, 20 Apr 2010 06:16:37 +0000 (08:16 +0200)]
mac80211: document IEEE80211_CONF_CHANGE_QOS
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Mon, 19 Apr 2010 08:24:22 +0000 (10:24 +0200)]
ath5k: basic support for survey
This adds the first element of survey data, the noise floor figure.
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Mon, 19 Apr 2010 08:23:57 +0000 (10:23 +0200)]
mac80211: sample survey implementation for mac80211 & hwsim
This adds the survey function to both mac80211 itself and to mac80211_hwsim.
For the latter driver, we simply invent some noise level.A real driver which
cannot determine the real channel noise MUST NOT report any noise, especially
not a magically conjured one :-)
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Yingqiang Ma [Tue, 13 Apr 2010 07:12:07 +0000 (15:12 +0800)]
ath9k: Group Key fix for VAPs
When I set up multiple VAPs with ath9k, I encountered an issue that
the traffic may be lost after a while.
The detailed phenomenon is
1. After a while the clients connected to one of these VAPs will get
into a state that no broadcast/multicast packets can be transfered
successfully while the unicast packets can be transfered normally.
2. Minutes latter the unitcast packets transfer will fail as well,
because the ARP entry is expired and it can't be freshed due to the
broadcast trouble.
It's caused by the group key overwritten and someone discussed this
issue in ath9k-devel maillist before, but haven't work out a fix yet.
I referred the method in madwifi, and made a patch for ath9k.
The method is to set the high bit of the sender(AP)'s address, and
associated that mac and the group key. It requires the hardware
supports multicast frame key search. It seems true for AR9160.
Not sure whether it's the correct way to fix this issue. But it seems
to work in my test. The patch is attached, feel free to revise it.
Signed-off-by: Daniel Yingqiang ma <yma.cool@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Xose Vazquez Perez [Mon, 19 Apr 2010 09:54:16 +0000 (11:54 +0200)]
wireless: rt2x00: rt2800usb: identify Allwin devices
Applied common sense, no info from the manufacturer:
(0x8516, 0x2070) is RT2070
(0x8516, 0x2770) is RT2770
(0x8516, 0x2870) is RT2870
[...]
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 19 Apr 2010 09:03:13 +0000 (11:03 +0200)]
mac80211: add missing newline
One HT debugging printk is missing a newline,
add it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Mon, 19 Apr 2010 07:16:23 +0000 (08:16 +0100)]
orinoco: have sparse check endian issues
Orinoco should be endian clean, so enable the checking.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Mon, 19 Apr 2010 07:16:22 +0000 (08:16 +0100)]
orinoco: use cfg80211_find_ie
Instead of using a local function.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Mon, 19 Apr 2010 07:16:21 +0000 (08:16 +0100)]
orinoco: implement set_wiphy_params
... to set fragmentation and RTS thresholds. Also report RTS retry
settings during wiphy init.
Note that the existing semantics for enabling microwave robustness are
preserved on firmwares that have it.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Juuso Oikarinen [Mon, 19 Apr 2010 07:12:52 +0000 (10:12 +0300)]
mac80211: Prevent running sta_cleanup timer unnecessarily
The sta_cleanup timer is used to periodically expire buffered frames from the
tx buf. The timer is executing periodically, regardless of the need for it.
This is wasting resources.
Fix this simply by not restarting the sta_cleanup timer if the tx buffer was
empty. Restart the timer when there is some more tx-traffic.
Cc: Janne Ylälehto <janne.ylalehto@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 19 Apr 2010 09:00:24 +0000 (11:00 +0200)]
mac80211: fix stopping RX BA session from timer
Kalle reported that his system deadlocks since my
recent work in this area. The reason quickly became
apparent: we try to cancel_timer_sync() a timer
from within itself. Fix that by making the function
aware of the context it is called from.
Reported-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Halperin [Sun, 18 Apr 2010 16:28:18 +0000 (09:28 -0700)]
mac80211: fix typo in comments
The flag is called IEEE80211_TX_STAT_AMPDU rather than using the whole word
STATUS.
Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Mon, 19 Apr 2010 20:37:59 +0000 (16:37 -0400)]
Merge branch 'wireless-next-2.6' of git://git./linux/kernel/git/iwlwifi/iwlwifi-2.6
Johannes Berg [Tue, 13 Apr 2010 08:04:35 +0000 (01:04 -0700)]
iwlwifi: make scan antenna forcing more generic
Some future hardware will also require some antenna
overrides so make the current logic more generic;
right now it is semantically based on a workaround
for off-channel reception but the reasons for the
new antenna overrides will be different.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Johannes Berg [Tue, 13 Apr 2010 08:04:34 +0000 (01:04 -0700)]
iwlwifi: remove monitor check
Off-channel reception is acceptable in monitor
mode, and checking for monitor mode this way is
not really correct anyway since it could be the
case while operating.
Now iwl_is_monitor_mode() is no longer used so
remove it completely.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Johannes Berg [Tue, 13 Apr 2010 08:04:33 +0000 (01:04 -0700)]
iwlwifi: don't check monitor for scanning
Monitor mode operation need not (and probably should
not) affect scanning this way since real monitoring
can not properly happen while scanning anyway.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Johannes Berg [Tue, 13 Apr 2010 08:04:32 +0000 (01:04 -0700)]
iwlwifi: rename TX_CMD_FLG_BT_DIS_MSK
The flag name is a little misleading, this
flag instructs the device to ignore bluetooth
messages for purposes of frame transmissions,
so rename the flag to TX_CMD_FLG_IGNORE_BT.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Johannes Berg [Tue, 13 Apr 2010 08:04:31 +0000 (01:04 -0700)]
iwlwifi: make BT coex config a virtual method
Some future hardware will require a different command to
be sent for bluetooth coexist, so make this a virtual
method that can be changed on a per-device basis.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Wey-Yi Guy [Tue, 13 Apr 2010 01:32:11 +0000 (18:32 -0700)]
iwlwifi: more code clean up for agn devices
Since multiple new devices having similar uCode architecture and use same
registers address, remove more reference to 5000 series to eliminate the
confusion.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Wey-Yi Guy [Mon, 12 Apr 2010 21:02:36 +0000 (14:02 -0700)]
iwlwifi: sanity check for turn on aggregation tid
Perform sanity check for turn on aggregation tid. Also remove the
option for turn on all the aggregation tids at once since it is
deprecated function and not being used.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Wey-Yi Guy [Fri, 9 Apr 2010 16:36:11 +0000 (09:36 -0700)]
iwlwifi: PA type for 6000g2 series
For 6000g2 series of NICs, PA type is determined by uCode, driver do not
have to set the register for internal/external PA. It is a workaround
just for 6000 series NICs.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Wey-Yi Guy [Fri, 9 Apr 2010 16:12:56 +0000 (09:12 -0700)]
iwlwifi: add hw revision for 6000g2 NIC
Add hardware revision for 6000g2 series of NIC
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Shanyu Zhao [Fri, 9 Apr 2010 02:03:55 +0000 (19:03 -0700)]
iwlwifi: remove redundant iwl_dump_lq_cmd()
This function is called twice in a row, remove the second one.
Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Abhijeet Kolekar [Thu, 8 Apr 2010 22:29:07 +0000 (15:29 -0700)]
iwlwifi: add debugfs ops to iwlwifi
Seperate debugfs functions into iwlagn specific
debugfs file and Add debugfs ops to iwlwifi.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Wey-Yi Guy [Thu, 8 Apr 2010 03:12:23 +0000 (20:12 -0700)]
iwlwifi: remove duplicated debug functions
Use the show uCode statistics function for uCode debugging purposes only; it
is being duplicated in both debugfs and sysfs. remove the one from sysfs.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Shanyu Zhao [Thu, 8 Apr 2010 01:06:36 +0000 (18:06 -0700)]
iwlwifi: bring up 6000 Series 2x2 AGN Gen2 adapters
This patch is to bring up 6000 Series 2x2 AGN Gen2 adapters.
Seperate various version numbers from 6000 Series definitions;
Add module firmware declaration for the new adapters;
Add additional device IDs and subsystem IDs;
Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Wey-Yi Guy [Wed, 7 Apr 2010 04:10:33 +0000 (21:10 -0700)]
iwlwifi: more generic eeprom defines
Some definition for eeprom apply to more than 5000 series device, change
the name to reflect it for easy reading.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Johannes Berg [Tue, 6 Apr 2010 11:12:42 +0000 (04:12 -0700)]
iwlwifi: trigger scan synchronously
Scan requesting doesn't need to be asynchronous
since all code paths leading up to it can sleep.
Make the scan request a new util operation that
is hw-specific (to account for 3945 vs. agn)
and call it right in place.
This patch moves a lot of code into iwlagn as
it need not be in iwlcore.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Johannes Berg [Tue, 6 Apr 2010 11:12:41 +0000 (04:12 -0700)]
iwlwifi: rename priv->scan to priv->scan_cmd
I keep checking what "priv->scan" is, so rename
it to "priv->scan_cmd" which more clearly tells
us what it is.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Johannes Berg [Tue, 6 Apr 2010 11:12:40 +0000 (04:12 -0700)]
iwlwifi: remove scan_pass_start
Since we no longer do a multi-pass scan,
keeping track of how long each pass took
is pointless since there will only be one.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Johannes Berg [Tue, 6 Apr 2010 11:12:39 +0000 (04:12 -0700)]
iwlwifi: remove next_scan_jiffies
This logic is just confusing, if anything it
belongs into mac80211. Also, even if we do
scan during the EAPOL handshake, that will
not cause any problems, just a short delay.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Johannes Berg [Tue, 6 Apr 2010 11:12:38 +0000 (04:12 -0700)]
iwlwifi: correct atomic bitops usage
With atomic bitops, test_and_{set,clear}_bit
should be used instead of separate test_bit
and set_bit/clear_bit.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Johannes Berg [Tue, 6 Apr 2010 11:12:37 +0000 (04:12 -0700)]
iwlwifi: remove scan_bands logic
Since mac80211 will now never request scanning
multiple bands, we can remove all the associated
logic and scan a single band only in each scan.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Wey-Yi Guy [Sat, 3 Apr 2010 23:44:39 +0000 (16:44 -0700)]
iwlwifi: set correct single/dual stream mask
Even the initial single/dual stream values will be overridden later when
issue link quality command; but still make sense not to use hard-code
value during initialization. Single/Dual stream mask are used to indicate the
best antenna for SISO/MIMO; different NIC has different tx antenna
configuration; so the parameter need to based on the valid tx antenna.
1x2 device: single tx antenna available, only SISO is valid
configuration, but still need to set up MIMO configuration, so set it up
with antenna A & B as default.
2x2 device: two tx antenna available, dual_stream will use both valid
antenna.
3x3 device: three tx antenna available, skip the first antenna and
choice the second and third antenna for dual_stream.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Reinette Chatre [Fri, 16 Apr 2010 20:43:40 +0000 (13:43 -0700)]
Merge branch 'wireless-2.6' into wireless-next-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-6000.c
Shanyu Zhao [Thu, 8 Apr 2010 01:37:52 +0000 (18:37 -0700)]
iwlwifi: correct 6000 EEPROM regulatory address
For 6000 series, the 2.4G HT40 band regulatory settings address in EEPROM
was off by 2.
Before the fix, you'll see this in dmesg:
[79535.788877] ieee80211 phy8: U iwl_mod_ht40_chan_info HT40 Ch. 7 [2.4GHz]
WIDE (0x61 0dBm): Ad-Hoc not supported
[79535.788880] ieee80211 phy8: U iwl_mod_ht40_chan_info HT40 Ch. 11 [2.4GHz]
WIDE (0x61 0dBm): Ad-Hoc not supported
And after the fix:
[91132.688706] ieee80211 phy14: U iwl_mod_ht40_chan_info HT40 Ch. 7 [2.4GHz]
IBSS ACTIVE WIDE (0x6f 0dBm): Ad-Hoc supported
[91132.688709] ieee80211 phy14: U iwl_mod_ht40_chan_info HT40 Ch. 11 [2.4GHz]
IBSS ACTIVE WIDE (0x6f 0dBm): Ad-Hoc supported
Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Johannes Berg [Wed, 7 Apr 2010 07:21:36 +0000 (00:21 -0700)]
iwlwifi: fix scan races
When an internal scan is started, nothing protects the
is_internal_short_scan variable which can cause crashes,
cf. https://bugzilla.kernel.org/show_bug.cgi?id=15667.
Fix this by making the short scan request use the mutex
for locking, which requires making the request go to a
work struct so that it can sleep.
Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Stanislaw Gruszka [Fri, 16 Apr 2010 13:47:56 +0000 (15:47 +0200)]
iwlwifi: initialize iwl_wimax_coex_cmd.flags
iwl_wimax_coex_cmd.flags can be really uninitialized, so fix
that.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Fri, 16 Apr 2010 13:46:41 +0000 (15:46 +0200)]
iwlwifi: check scan request ie_len
In mac80211 we always check both scan_req->ie and scan_req->ie_len
against zero before usage, in iwlwifi we should do the same.
Remove not needed "left -= ie_len" while at it.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Grazvydas Ignotas [Fri, 16 Apr 2010 10:22:12 +0000 (13:22 +0300)]
wl1251: add support for dedicated IRQ line
wl1251 has WLAN_IRQ pin for generating interrupts to host processor,
which is mandatory in SPI mode and optional in SDIO mode (which can
use SDIO interrupts instead). However TI recommends using deditated
IRQ line for SDIO too.
Add support for using dedicated interrupt line with SDIO, but also leave
ability to switch to SDIO interrupts in case it's needed.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Fri, 16 Apr 2010 06:24:03 +0000 (11:54 +0530)]
ath9k_htc: Fix sparse endian warnings
This patch fixes a bunch of endian issues that
were exposed by sparse. It's a miracle that the driver
worked at all till now.
The Lord be praised.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Fri, 16 Apr 2010 06:24:01 +0000 (11:54 +0530)]
ath9k_htc: Handle WMI timeouts properly
If a WMI command has timed out for some reason,
a late WMI response would end up updating the
response region of a new WMI request that has been
issued in the meantime.
Fix this race condition by dropping a WMI response
if a new WMI command has been issued.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Fri, 16 Apr 2010 06:24:00 +0000 (11:54 +0530)]
ath9k_htc: Add dropped SKB count to debugfs
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Fri, 16 Apr 2010 06:23:58 +0000 (11:53 +0530)]
ath9k_htc: Remove GPIO set on unload
There is no point in trying to set the LED pin
when the module is being unloaded. The target
would be reset anyway.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Fri, 16 Apr 2010 06:23:57 +0000 (11:53 +0530)]
ath9k_hw: Use buffered register writes
This patch adds macros at certain places
which could be optimized for multiple register writes.
The performance of ath9k_htc improves considerably,
especially reducing the latency involved in a scan run.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Fri, 16 Apr 2010 06:23:56 +0000 (11:53 +0530)]
ath9k_hw: Relocate Opmode initialization
Programming the opmode in the HW can be done
before the assoc_id and STA_ID registers are
setup. This helps ath9k_htc when multiple register
writes are used.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Fri, 16 Apr 2010 06:23:55 +0000 (11:53 +0530)]
ath9k_hw: Add macros for multiple register writes
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Fri, 16 Apr 2010 06:23:53 +0000 (11:53 +0530)]
ath9k_htc: Implement multiple register write support
This patch adds support for writing multiple registers
in a single USB command.
Specific calls from the HW code that performs multiple
register writes would be modified to make use of this
in subsequent patches.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Fri, 16 Apr 2010 06:23:50 +0000 (11:53 +0530)]
ath: Add buffered register write operations
This is required to implement delayed/buffered
register writes in ath9k_htc.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Fri, 16 Apr 2010 06:23:48 +0000 (11:53 +0530)]
ath9k_htc: Cleanup beacon configuration
This patch cleans up beacon configuration,
removing a redundant interface type check
and updating beacon interval in the correct place.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Fri, 16 Apr 2010 01:28:44 +0000 (09:28 +0800)]
iwmc3200wifi: check sparse endianness annotations
Add -D__CHECK_ENDIAN__ to driver ccflags so that sparse will
always check endianness by default.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Fri, 16 Apr 2010 01:28:43 +0000 (09:28 +0800)]
iwmc3200wifi: Fix sparse warnings
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Benoit Papillault [Thu, 15 Apr 2010 22:07:26 +0000 (00:07 +0200)]
ath5k/ath9k: Fix 64 bits TSF reads
According to tests, both TSF lower and upper registers kept counting, so
the higher part could have been updated after the lower part has been
read, as shown in the following log where the upper part is read first
and the lower part next.
tsf = {
00000003-
fffffffd}
tsf = {
00000003-
00000001}
tsf = {
00000004-
0000000b}
This patch corrects this by checking that the upper part has not been
changed while the lower part was read. It has been tested in an IBSS
network where artifical IBSS merges have been done in order to trigger
hundreds of rollover for the TSF lower part.
It follows the logic mentionned by Derek, with only 2 register reads
needed at each additional steps instead of 3 (the minimum number of
register reads is still 3).
Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:42 +0000 (17:39 -0400)]
ath9k_hw: add the PCI ID for the first AR9300 device
The first AR9003 hardware family device supported is the
AR9300, which has the vendor:device id 168c:0030
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Thu, 15 Apr 2010 21:39:41 +0000 (17:39 -0400)]
ath9k_hw: Abort rx if hw is not coming out of full sleep in reset
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Thu, 15 Apr 2010 21:39:40 +0000 (17:39 -0400)]
ath9k: Enable TXOK and TXERR interrupts for TX EDMA
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:39 +0000 (17:39 -0400)]
ath9k: add LDPC support
LDPC is enabled by the rate control if the its determined
that the target peer supports LDPC. We would have already
intersected the HT capabilities so if our peer supports
LDPC so do we.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:38 +0000 (17:39 -0400)]
ath9k_hw: add LDPC support for AR9003
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:37 +0000 (17:39 -0400)]
mac80211: add LDPC control flag
LDPC will be enabled through the rate control algorithm
for each buffer the the tx_info flags.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Thu, 15 Apr 2010 21:39:36 +0000 (17:39 -0400)]
ath9k: Add Tx EDMA support
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Thu, 15 Apr 2010 21:39:35 +0000 (17:39 -0400)]
ath9k_hw: Compute pointer checksum over the link descriptor
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Thu, 15 Apr 2010 21:39:34 +0000 (17:39 -0400)]
ath9k: Initialize and configure tx status for EDMA
Also add a function to clean up tx status ring.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Thu, 15 Apr 2010 21:39:33 +0000 (17:39 -0400)]
ath9k: Setup appropriate tx desc for regular dma and edma
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:32 +0000 (17:39 -0400)]
ath9k_hw: set cwmin and cwmax to 0 for for AR9003 upon txq reset
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:31 +0000 (17:39 -0400)]
ath9k_hw: enable CRC check of descriptors for AR9003
Enable CRC check on the descriptor fetched from host on AR9003
upon reseting the TX queue.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:30 +0000 (17:39 -0400)]
ath9k: add RXLP and RXHP to debugfs counters
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Thu, 15 Apr 2010 21:39:29 +0000 (17:39 -0400)]
ath9k_hw: Fill descriptor abstrations for AR9003
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:28 +0000 (17:39 -0400)]
ath9k_hw: move AR9002 mac ops to its own file
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Thu, 15 Apr 2010 21:39:27 +0000 (17:39 -0400)]
ath9k_hw: Add function to configure tx status ring buffer
Also reset tx status ring suring chip reset.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Thu, 15 Apr 2010 21:39:26 +0000 (17:39 -0400)]
ath9k_hw: Define abstraction for tx desc access
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Thu, 15 Apr 2010 21:39:25 +0000 (17:39 -0400)]
ath9k: Load SW filtered NF values and start NF cal during full reset for AR9003
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:24 +0000 (17:39 -0400)]
ath9k_hw: skip WEP aggregation enable code for AR9003
The AR9002 hardware code enables aggregation for WEP but
mac80211 doesn't enable aggregation with WEP, and the AR9003
code family does not need this so skip it for now for AR9003
but leave the code and annotate we should eventually consider
how to remove this in consideration for the HAL unification
goals.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:23 +0000 (17:39 -0400)]
ath9k_hw: skip asynch fifo enablement to AR9003
The asynch fifo code is specific to >= AR9287 so stuff it
into the AR9002 hardware family code and skip it for AR9003
cards.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Thu, 15 Apr 2010 21:39:22 +0000 (17:39 -0400)]
ath9k_hw: Update ath9k_hw_set_dma for AR9300
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:21 +0000 (17:39 -0400)]
ath9k_hw: add TX/RX gain register initialization for AR9003
This is done depending on what the EEPROM settings indicates.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:20 +0000 (17:39 -0400)]
ath9k_hw: add the AR9300 SREV hw name print
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Thu, 15 Apr 2010 21:39:19 +0000 (17:39 -0400)]
ath9k_hw: Configure Tx interrupt mitigation timer
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:18 +0000 (17:39 -0400)]
ath9k_hw: move the RF claim stuff to AR9002 hardware family
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Thu, 15 Apr 2010 21:39:17 +0000 (17:39 -0400)]
ath9k_hw: move AR9280 PCI EEPROM fix to eeprom_def.c
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Thu, 15 Apr 2010 21:39:16 +0000 (17:39 -0400)]
ath9k_hw: Fill get_isr() for AR9003
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:15 +0000 (17:39 -0400)]
ath9k_hw: add OFDM spur mitigation for AR9003
We add this now as OFDM spur mitigation required accessing
the EEPROM for the AR9003 devices.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Senthil Balasubramanian [Thu, 15 Apr 2010 21:39:14 +0000 (17:39 -0400)]
ath9k_hw: Implement AR9003 eeprom callbacks
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:13 +0000 (17:39 -0400)]
ath9k_hw: restore mac address reading logic
Once upon a time the AR_EEPROM_MAC macro was added to let us
add a random attribute to the three 4-bytes of MAC addresses
entries we read from the EEPROM. This was good while a random
high-enough value was used which did not conflict with any
of the already existing enum eeprom_param values. With AR9003
support the enums overlap and it means we either increment
the random offset or just restore the reading logic to match
what the HAL has. I choose to do the later to synchronize
the logic on both code bases.
This should fix reading the MAC address from the EEPROM
on AR9003 hardware.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:12 +0000 (17:39 -0400)]
ath9k_hw: rename eep_AR9287_ops to eep_ar9287_ops
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:11 +0000 (17:39 -0400)]
ath9k_hw: complete AR9003 calibration
This goes with some new shiny TX IQ calibration that AR9003
hardware family supports.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:10 +0000 (17:39 -0400)]
ath9k_hw: fill in the callbacks for calibration for AR9003
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 15 Apr 2010 21:39:09 +0000 (17:39 -0400)]
ath9k_hw: abstract loading noisefloor
This is the last call on calib.c which acceses PHY stuff,
with this change we calib.c is now generic between both
all supported hardware families.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>