Wey-Yi Guy [Fri, 15 Jan 2010 21:43:34 +0000 (13:43 -0800)]
iwlwifi: format and show statistics counter from uCode
To help debug uCode related problem, adding "delta" and "max"
information in debugfs statistics counters display.
Those information show the delta between two statistics report from
uCode, user can monitor the counters for any "un-normal" behavior.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Jay Sternberg<jay.e.sternberg@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 15 Jan 2010 21:43:33 +0000 (13:43 -0800)]
iwlwifi: fix clear statistics counter command
When receive reply statistics command with "clear" mask, just reset the
accumulated statistics counters, but not the current statistics counters,
so the accumulated statistics counter can provide the correct
information.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Tue, 12 Jan 2010 03:08:26 +0000 (04:08 +0100)]
mac80211: fix WMM AC default for non-QoS data frames
The WMM AC selection added to the monitor mode selection function
accidentally assigns non-QoS data frames to the same AC as mgmt frames
(VO). This is not serious, but should be fixed anyway. This patch
assigns them to the BE AC instead.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 19 Jan 2010 20:58:41 +0000 (15:58 -0500)]
Merge git://git./linux/kernel/git/linville/wireless-2.6
Hin-Tak Leung [Mon, 18 Jan 2010 01:24:11 +0000 (01:24 +0000)]
zd1211rw: adding 0409:0248 to supported device list
Yasuhiro ABE <yadiary@gmail.com> reported success in sourceforge zd1211-dev list.
The device is a NEC Aterm WL54GU usb wireless stick.
The brand and retail product name
NEC, Aterm PA-WL54GU
The USB ID's (duh)
ID 0409:0248
The chip ID string
zd1211rw 1-1:1.0: zd1211b chip 0409:0248 v4810 high 00-1b-8b AL2230S_RF pa0 g--N-
The FCC ID
unknown
Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: Yasuhiro ABE <yadiary@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Sun, 17 Jan 2010 23:07:38 +0000 (00:07 +0100)]
p54pci: rx frame length check
A long time ago, a user reported several crashes due to
data corruptions which are likely the result of a
not-100%-supported, or faulty? PCI bridge.
( http://patchwork.kernel.org/patch/53004/ )
This patch fixes entry #1.
"1. p54p_check_rx_ring - skb_over_panic: Under a ping flood
or just left running for a bit would panic with a skb_over_panic."
As described in the mail: The invalid frame length causes
skb_put to bailout and trigger a crash.
Note:
Simply dropping the frame is problematic, because if its content
contains a tx feedback we would lose some portion of the device
memory space.... And the driver/mac80211 should handle all other
invalid data.
Reported-by: Quintin Pitts <geek4linux@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Sat, 16 Jan 2010 19:36:52 +0000 (14:36 -0500)]
mac80211: fix sign error in pid controller
While testing the pid rate controller in mac80211_hwsim, I noticed
that once the controller reached 54 Mbit rates, it would fail to
lower the rate when necessary. The debug log shows:
1945 186786 pf_sample 50 3534 3577 50
My interpretation is that the fixed point scaling of the target
error value (pf) is incorrect: the error value of 50 compared to
a target of 14 case should result in a scaling value of
(14-50) = -36 * 256 or -9216, but instead it is (14 * 256)-50, or
3534.
Correct this by doing fixed point scaling after subtraction.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Stefano Brivio <stefano.brivio@polimi.it>
Acked-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reinette Chatre [Fri, 15 Jan 2010 21:42:59 +0000 (13:42 -0800)]
iwlwifi: add license to tracing files
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 15 Jan 2010 21:42:58 +0000 (13:42 -0800)]
iwlwifi: Fix throughput stall issue in HT mode for 5000
Similar to 6000 and 1000 series, RTS/CTS is the recommended protection
mechanism for 5000 series in HT mode based on the HW design.
Using RTS/CTS will better protect the inner exchange from interference,
especially in highly-congested environment, it also prevent uCode encounter
TX FIFO underrun and other HT mode related performance issues.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
CC: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 15:38:07 +0000 (16:38 +0100)]
b43: N-PHY: drop unused definition, uncomment needed call
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 15:24:57 +0000 (16:24 +0100)]
b43: N-PHY: implement TX power control coef setup
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 15:20:56 +0000 (16:20 +0100)]
b43: N-PHY: add RX IQ calibrationi for rev < 3
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 15:10:48 +0000 (16:10 +0100)]
b43: N-PHY: add huge calculating TX IQ LO
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 15:08:25 +0000 (16:08 +0100)]
b43: N-PHY: implement calculating IQ gain params
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 15:06:35 +0000 (16:06 +0100)]
b43: N-PHY: update TX calibration ladder
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 14:55:18 +0000 (15:55 +0100)]
b43: N-PHY: add RX radio cores calibration
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 14:51:55 +0000 (15:51 +0100)]
b43: N-PHY: add TX LP FBW (TX filter 40 related)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 14:40:50 +0000 (15:40 +0100)]
b43: N-PHY: implement getting TX gains
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 14:29:05 +0000 (15:29 +0100)]
b43: N-PHY: implement calculating RX IQ comp
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 14:26:12 +0000 (15:26 +0100)]
b43: N-PHY: implement RX IQ estimation
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 14:18:35 +0000 (15:18 +0100)]
b43: N-PHY: implement restoring general configuration
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>a
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 14:17:10 +0000 (15:17 +0100)]
b43: N-PHY: implement workaround for TX IQ
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 14:16:25 +0000 (15:16 +0100)]
b43: N-PHY: implement RX IQ coeffs
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 14:10:54 +0000 (15:10 +0100)]
b43: N-PHY: add function than forces (not) staying in carrier search
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 14:06:47 +0000 (15:06 +0100)]
b43: N-PHY: add RSSI calibration restore
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>`
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 14:02:38 +0000 (15:02 +0100)]
b43: N-PHY: implement PA overriding (RF control related)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 13:48:21 +0000 (14:48 +0100)]
b43: N-PHY: RSSI calibration for rev < 3
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 13:45:13 +0000 (14:45 +0100)]
b43: N-PHY: add RSSI polling and setting 2055 (radio) VCM
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 13:38:32 +0000 (14:38 +0100)]
b43: N-PHY: implement RSSI selection and offset scaling
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 13:31:39 +0000 (14:31 +0100)]
b43: N-PHY: add clip detection reading/writing and some classifier function
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 12:40:58 +0000 (13:40 +0100)]
b43: N-PHY: split RSSI calibration into 2 functions (rev2, rev3)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 12:36:43 +0000 (13:36 +0100)]
b43: N-PHY: update CCA reset
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 12:27:29 +0000 (13:27 +0100)]
b43: N-PHY: update init code to match current specs
Previous init path was based on old specs from old driver. Update it
as much as possible leaving some TODOs for not implemented functions.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 12:02:45 +0000 (13:02 +0100)]
b43: N-PHY: add various tables
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 11:54:30 +0000 (12:54 +0100)]
b43: N-PHY: add global variables to b43_phy_n struct
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 11:40:03 +0000 (12:40 +0100)]
b43: N-PHY: add missing register definitions
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 11:34:21 +0000 (12:34 +0100)]
b43: N-PHY: add needed struct definitions
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 11:27:46 +0000 (12:27 +0100)]
b43: N-PHY: add shared memory offsets definitions
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 11:18:21 +0000 (12:18 +0100)]
b43: N-PHY: clean table init, check PHY rev
Move table init to tables_nphy.c, detect newer PHY which use different init.
We don't init newer PHYs yet but this at least shows what more is needed.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 11:10:53 +0000 (12:10 +0100)]
b43: add new SSB's core id for BCM4328
Following line shows my BCM4328 detected on SSB. We didn't include 0x0C rev.
ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x0C, vendor 0x4243)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 15 Jan 2010 11:01:49 +0000 (12:01 +0100)]
b43: use standard fls for finding the most significant bit
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 15 Jan 2010 01:34:58 +0000 (02:34 +0100)]
ath9k: implement coverage class support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 15 Jan 2010 01:33:40 +0000 (02:33 +0100)]
ath9k: cleanup slot time and ack/cts timeout handling
Previously ath9k left the initialization of slot timing and ACK/CTS
timeout to the mode specific initvals. This does not handle short vs
long slot in 2.4 GHz and uses a rather strange value for the 2.4 GHz
ACK timeout (64 usec).
This patch uses the proper ath9k_hw functions for setting slot time and
timeouts and also implements the switch between short and long slot
time in 2.4 GHz
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ming Lei [Fri, 15 Jan 2010 13:44:21 +0000 (21:44 +0800)]
mac80211: fix memory leak in ieee80211_send_probe_req
This patch fixes memory leak in ieee80211_send_probe_req, which
is introduced in
7c12ce8b854df346388ea56d684784e3484012cf:
mac80211: use Probe Request template when sending a direct scan
The patch is against the latest wireless-test tree.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 15 Jan 2010 02:00:48 +0000 (03:00 +0100)]
mac80211: force use_short_slot=true for 5GHz
Normally 5GHz does not have a concept of long vs short slot time,
however the slot time that it ends up using is the same as for 2.4 GHZ
and use_short_slot == true
Because of that, it makes more sense to force use_short_slot = true
whenever 5 GHz is being used, so that this particular check does not
have to be in every single driver that uses this flag.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Fri, 15 Jan 2010 01:08:20 +0000 (20:08 -0500)]
cfg80211: make regulatory_hint_11d() band specific
In practice APs do not send country IE channel triplets for channels
the AP is not operating on and if they were to do so they would have
to use the regulatory extension which we currently do not process.
No AP has been seen in practice that does this though so just drop
those country IEs.
Additionally it has been noted the first series of country IE
channels triplets are specific to the band the AP sends. Propagate
the band on which the country IE was found on reject the country
IE then if the triplets are ever oustide of the band.
Although we now won't process country IE information with multiple
band information we leave the intersection work as is as it is
technically possible for someone to want to eventually process these
type of country IEs with regulatory extensions.
Cc: Jouni Malinen <jouni.malinen@atheros.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Benoit Papillault [Thu, 14 Jan 2010 22:20:31 +0000 (23:20 +0100)]
mac80211: Fixed netif_tx_wake_all_queues in IBSS mode
When ieee80211_offchannel_return is called, it needs to re-enabled TX
queues that have been stopped in ieee80211_offchannel_stop_beaconing or
ieee80211_offchannel_stop_station. It happens if we are doing a scan with an
IBSS interface. In this case, the interface stopped transmitting.
Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Benoit Papillault [Fri, 15 Jan 2010 11:21:37 +0000 (12:21 +0100)]
mac80211: check that ieee80211_set_power_mgmt only handles STA interfaces.
ieee80211_set_power_mgmt is meant for STA interfaces only. Moreover,
since sdata->u.mgd.mtx is only initialized for STA interfaces, using
this code for any other type of interface (like creating a monitor
interface) will result in a oops.
Cc: stable@kernel.org
Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Thu, 14 Jan 2010 19:13:47 +0000 (13:13 -0600)]
Staging: r8187se: Fix compile error from wireless-testing commit
7044cc56
In wireless-testing, commit
7044cc56 added struct ieee80211_hdr_3addr
to include/linux/ieee80211.h. This definition collides with one that is
in the r8187se driver in staging.
The conflict is resolved by changing r8187se to use the definition from
include/linuc/ieee80211.h.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 14 Jan 2010 18:27:46 +0000 (13:27 -0500)]
cfg80211: Ingore country IEs with a zero set of number of channels
Previous to this and the last patch, titled,
"cfg80211: Fix 2 GHz subband calculation for country IEs"
we would end up treating these IEs as single channel units. These are in
fact just bogus IE triplets so ignore the entire IE if these are found.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Thu, 14 Jan 2010 11:09:21 +0000 (13:09 +0200)]
mac80211: improve powersave documentation
There has been some confusion how drivers should implement powersave
support. Improve the documentation a bit to make it more clear what
drivers need to do. Also mention about U-APSD.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Thu, 14 Jan 2010 11:09:14 +0000 (13:09 +0200)]
mac80211: fix mac80211.h documentation warnings
There were some warnings about missing documentation and a missing reference.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Thu, 14 Jan 2010 04:50:57 +0000 (10:20 +0530)]
ath9k: Fix panic on driver load
The device has to be marked as invalid before
registering the ISR. HW initialization takes place
after the ISR has been registered, and the invalid
flag is eventually cleared in the ->stop() callback.
Reported-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christoph Egger [Wed, 13 Jan 2010 13:36:24 +0000 (14:36 +0100)]
Remove config option B43_LEGACY_RFKILL completely
In
f41f3f373dd72344c65d801d6381fe83ef3a2c54 the B43 driver was ported
to use the cfg80211 API for rfkill and consequently the config option
was dropped (RFKILL is now unconditionally enabled).
However in the Kernel Info the feature is still checked and reported
missing. This patch just removes the conditional and the relevant code
blocks while still reporting that feature unconditionally would be
another option (it's always there).
Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Tue, 12 Jan 2010 23:23:04 +0000 (18:23 -0500)]
wl1271: remove unused flags
These are unused and as with a previous patch 5ef5da for wl1251
this removes some other unused flags. the IRQ_MASK specifically
conflicts with include/pcmcia/cs.h when using compat-wireless.
Cc: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tim Gardner [Tue, 12 Jan 2010 18:58:17 +0000 (12:58 -0600)]
b43legacy: Declare all possible ucodeX.fw files
Enhance module information with the names of the firmware files
that could be used by this driver. This helps tools like Jockey to
correctly detect and/or install the firmware files relevant to
this driver.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 7 Jan 2010 22:24:55 +0000 (17:24 -0500)]
cfg80211: fix 2 GHz subband calculation for country IEs
Country IEs triplets are getting an extra channel with
the current count. This does not affect regulatory because
we always took the intersection between what the AP gave
and what CRDA believed is correct.
This however does fix processing some Country IEs with multiple
sequential 2 GHz triplets. Since our parser and the spec mandates
all channels be monitonically increasing we would drop the IE after
noticing the second triplet begins on a channel already processed.
APs that send these type of country IEs seems rare though.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tim Gardner [Thu, 7 Jan 2010 18:10:38 +0000 (11:10 -0700)]
b43: Declare at least one real firmware file using MODULE_FIRMWARE.
BugLink: http://bugs.launchpad.net/bugs/488636
Enhances module information with the names of the firmware files
that could be used by this driver. This helps tools like Jockey to
correctly detect and/or install the firmware files relevant to
this driver.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Abhijeet Kolekar [Wed, 13 Jan 2010 21:23:14 +0000 (13:23 -0800)]
cfg80211: fix channel setting for wext
Patch fixes the bug at
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2139
Currently we cannot set the channel using wext extension
if we have already associated and disconnected. As
cfg80211_mgd_wext_siwfreq will not switch the channel if ssid is set.
This fixes it by clearing the ssid.
Following is the sequence which it tries to fix.
modprobe iwlagn
iwconfig wlan0 essid ""
ifconfig wlan0 down
iwconfig wlan0 chan X
wext is marked as deprecate.If we use nl80211 we can easily play with
setting the channel.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Wed, 13 Jan 2010 11:09:08 +0000 (12:09 +0100)]
iwmc3200wifi: Add UMAC wifi headers to the pmkid command
Without this header, we can trigger a UMAC crash with debug enabled UMACs.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 14 Jan 2010 22:00:54 +0000 (17:00 -0500)]
Revert "iwmc3200wifi: fix array out-of-boundary access"
This reverts commit
6c853da3f30c93eae847ecbcd9fdf10ba0da04c2.
From Message-ID: <
1262663293.551.117.camel@debian>
On Sat, 2010-01-02 at 22:09 +0800, Dan Carpenter wrote:
> It don't think
6c853da3f30c93 is right. That's the patch
> titled "iwmc3200wifi: fix array out-of-boundary access"
>
> Allocate priv->rx_packets[IWM_RX_ID_HASH + 1] because the max array
> index is IWM_RX_ID_HASH according to IWM_RX_ID_GET_HASH().
>
> In 2.6.33-rc2 IWM_RX_ID_GET_HASH() doesn't go as high as IWM_RX_ID_HASH
> and I don't see any array out-of-bounds.
>
> #define IWM_RX_ID_GET_HASH(id) ((id) % IWM_RX_ID_HASH)
Ah, you are right. I took '%' for '&'. John, would you revert it? Sorry
for the false alarm.
Thanks,
-yi
Reported-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:51:38 +0000 (13:51 +0100)]
mwl8k: update version number (to 0.12) and copyright
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:51:30 +0000 (13:51 +0100)]
mwl8k: enable multi-BSS AP operation
As follows:
- GET_HW_SPEC is now responsible for setting
priv->{ap,sta}_macids_supported, which are bitmasks of supported
macids for AP and STA mode. (Typically, STA firmware images will
support only one macid, #0, in STA mode, and AP firmware images
will support macids #0-7, in AP mode.)
- Our wiphy ->interfaces_modes is now set based on the non-zero-ness
of these two bitmasks.
- We main priv->macids_used, a bitmask of which macids are currently
in use. ->add_interface() will assign the lowest free macid for
this interface type as it is created, or bail out if there are no
more free macids to assign. ->delete_interface() will mark the
macid as being free again.
This enables the multi-BSS code added in the previous commits.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:50:36 +0000 (13:50 +0100)]
mwl8k: post per-vif firmware commands as per-vif commands
SET_BEACON, SET_MAC_ADDR, BSS_START and SET_NEW_STN are the currently
supported firmware commands that are actually per-vif commands. Use
mwl8k_post_pervif_cmd() for these commands, so that the macid of the
vif they operate on gets passed down into the firmware.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:50:14 +0000 (13:50 +0100)]
mwl8k: prepare for posting per-vif firmware commands
One of the bytes in the mwl8k firmware command header is the 'macid'
byte, which for per-vif commands indicates which of the BSSes this
command is intended for. (For commands that are not per-vif commands,
this byte can just be 0.)
This patch adds mwl8k_post_pervif_cmd(), which will take the macid
assigned to this interface (to be done in ->add_interface()), copy it
into the command packet macid field, and post the command as usual.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:49:51 +0000 (13:49 +0100)]
mwl8k: convert the priv->vif pointer to a list of vifs
To prepare for adding multi-BSS support.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:49:41 +0000 (13:49 +0100)]
mwl8k: use firmware capability field to decide which bands to register
Make the decision about whether to register the 2.4 and 5 GHz bands
with mac80211 by looking at the capability field in GET_HW_SPEC (STA
firmware only for now). This enables 5 GHz STA operation.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:49:18 +0000 (13:49 +0100)]
mwl8k: allow selecting 5 GHz channels
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:49:15 +0000 (13:49 +0100)]
mwl8k: handle 5 GHz legacy rate bitmaps in firmware commands
Whenever mac80211 gives us a legacy rate bitmap in the context of the
5 GHz band, we need to remember to shift the bitmap left by 5 positions
before giving it to the firmware, as the firmware follows the bitmap
bit assignment of the 2.4 GHz rate table even if we're on the 5 GHz
band, and the 2.4 GHz rate table includes five non-OFDM rates at the
start that are not valid in the 5 GHz band.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:48:56 +0000 (13:48 +0100)]
mwl8k: properly set receive status rate index on 5 GHz receive
The mwl8k firmware uses indices into the 2.4 GHz band rate table for
the receive descriptor channel field even if the packet was received
on a 5 GHz channel, while mac80211 expects an index into the 5 GHz
band rate table when packets are received on the 5 GHz band, which
presents a mismatch as the 5 GHz band rate table lacks the five
non-OFDM rates that the 2.4 GHz rate table starts with.
To handle this properly, we need to substract 5 from the rate index
field if the packet was received on a 5 GHz channel (and was not
received at an MCS rate).
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:48:32 +0000 (13:48 +0100)]
mwl8k: add 5 GHz band channels and rates
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:48:17 +0000 (13:48 +0100)]
mwl8k: move responsibility for initialising wiphy bands to GET_HW_SPEC
So that we can make 2.4 GHz and 5 GHz band registration conditional
on the capability bitmask returned by the firmware.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:48:04 +0000 (13:48 +0100)]
mwl8k: rename 2.4 GHz band/channels/rates related variables from FOO to FOO_24
To prepare for adding 5 GHz band/channels/rates.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:47:53 +0000 (13:47 +0100)]
mwl8k: add another 88w8366 PCI ID
0x2a43 is a single-band (2.4GHz only) 88w8366 mini-PCIe card.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:47:47 +0000 (13:47 +0100)]
mwl8k: simplify sequence number assignment
By storing the sequence counter in << 4 format, like other drivers do.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:47:37 +0000 (13:47 +0100)]
mwl8k: don't call SET_AID if we're not associated
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:47:32 +0000 (13:47 +0100)]
mwl8k: remove (mostly) write-only variable priv->current_channel
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Tue, 12 Jan 2010 12:47:22 +0000 (13:47 +0100)]
mwl8k: update MODULE_FIRMWARE tags
Add MODULE_FIRMWARE tags for the mwl8k firmware images that don't
have them yet, and move them to where the firmware image names are
declared.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Tue, 12 Jan 2010 08:43:15 +0000 (10:43 +0200)]
wl1251: add U-APSD support
wl1251 firmware supports U-APSD just with a simple queue configuration
change so enable it.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Tue, 12 Jan 2010 08:43:07 +0000 (10:43 +0200)]
wl1251: create qos null data template
The qos null data template is needed for U-APSD.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Tue, 12 Jan 2010 08:43:00 +0000 (10:43 +0200)]
ieee80211: add struct ieee80211_hdr_qos
The header can be used to create qos nullfunc frames, for example.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Tue, 12 Jan 2010 08:42:53 +0000 (10:42 +0200)]
mac80211: check uapsd state for dynamic power save
To make U-APSD client mode effective, we must not wake up from dynamic power
save when transmitting frames. So if dynamic power save is enabled, it needs
check the queue the transmitted packet is in and decide if we need to wake
up or not.
In a perfect world, where all packets would have correct QoS tags, U-APSD
enabled queues should not trigger wakeup from power save. But in the real
world, where very few packets have correct QoS tags, this won't work. For
example, if only voip class has U-APSD enabled and we send a packet in voip
class, but the packets we receive are in best effort class, we would receive
the packets with the legacy power save method. And that would increase
latencies too much from a voip application point of view.
The workaround is to enable U-APSD for all qeueus and still use dynamic ps
wakeup for all other queues except voip. That way we can still save power
with a voip application and not sacrifice latency. Normal traffic (in
background, best effort or video class) would still trigger wakeup from
dynamic power save.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Tue, 12 Jan 2010 08:42:46 +0000 (10:42 +0200)]
mac80211: create tx handler for dynamic ps
Currently dynamic ps check is in ieee80211_xmit(), but it's cleaner
to have a separate tx handler for this. Also this is a prerequisite for
U-APSD client mode which needs to know the queue frame is in.
Also need_dynamic_ps() function is embedded to the tx handler.
No functional changes expect that the code is run in a later phase than
originally.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Tue, 12 Jan 2010 08:42:39 +0000 (10:42 +0200)]
mac80211: add debugfs interface for U-APSD queue configuration
Because it's not yet decided how to configure which queues are U-APSD
enabled, add a debugfs interface for testing purposes.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Tue, 12 Jan 2010 08:42:31 +0000 (10:42 +0200)]
mac80211: add U-APSD client support
Add Unscheduled Automatic Power-Save Delivery (U-APSD) client support. The
idea is that the data frames from the client trigger AP to send the buffered
frames with ACs which have U-APSD enabled. This decreases latency and makes it
possible to save even more power.
Driver needs to use IEEE80211_HW_UAPSD to enable the feature. The current
implementation assumes that firmware takes care of the wakeup and
hardware needing IEEE80211_HW_PS_NULLFUNC_STACK is not yet supported.
Tested with wl1251 on a Nokia N900 and Cisco Aironet 1231G AP and running
various test traffic with ping.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sun, 10 Jan 2010 16:12:41 +0000 (17:12 +0100)]
mac80211: remove unused type argument
The type argument to DEBUGFS_ADD() isn't used
and can be removed, it's around from before
the conversion to debugfs_remove_recursive().
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Sun, 10 Jan 2010 13:07:53 +0000 (14:07 +0100)]
mac80211: flush workqueue before calling driver ->stop() method
Since commit "mwl8k: handle station database update for AP's sta entry
via ->sta_notify()", mwl8k every now and then gets a command timeout
when ifconfig'ing a STA interface down. This turns out to be due to
mwl8k_stop() being called while the work queue item that was scheduled
by mwl8k_sta_notify() to remove the STA entry for the associated AP is
still queued, and the former disables interrupts so that when the
latter eventually runs, a command completion interrupt is never seen.
Fix this by changing ieee80211_stop_device() so that the workqueue is
flushed before drv_stop() is called, instead of doing it the other way
around as is done now. (As ->stop() is allowed to sleep, there isn't
any reason for drivers to queue work from within it.)
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Joe Perches [Sat, 9 Jan 2010 06:33:38 +0000 (22:33 -0800)]
net/mac80211/mlme.c: Remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
H Hartley Sweeten [Fri, 8 Jan 2010 23:14:10 +0000 (16:14 -0700)]
iwl-debugfs.c: remove unnecessary casts of void *
void pointers do not need to be cast to other pointer types.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 8 Jan 2010 18:04:44 +0000 (10:04 -0800)]
iwlwifi: fix bug in tx byte count table
When setting invalid byte count in txq byte count table, read pointer
should be used instead of write pointer.
Reported-by: Guo, Chaohong <chaohong.guo@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 8 Jan 2010 18:04:43 +0000 (10:04 -0800)]
iwlwifi: remove obsoleted host command
"RADAR_NOTIFICATION" host command is not used and not supported by uCode,
remove it from driver code.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 8 Jan 2010 18:04:42 +0000 (10:04 -0800)]
iwlwifi: ucode statistics data structure update
Update data structure to match latest statistics report from uCode.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 8 Jan 2010 18:04:41 +0000 (10:04 -0800)]
iwlwifi: add IEEE80211_AMPDU_TX_OPERATIONAL
mac80211 do not check the return code now, what if mac80211 does start
using the return code? IEEE80211_AMPDU_TX_OPERATIONAL is a valid action,
just iwlwifi driver do not need to take any action for it; so instead of
return "-EINVAL", it is a good program practice to return "-EOPNOTSUPP"
to make sure mac80211 will not get wrong impression.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 8 Jan 2010 18:01:07 +0000 (19:01 +0100)]
mac80211: fix return from ieee80211_assoc_success
sparse pointed out that I made a mistake converting
the return value of ieee80211_assoc_success to bool,
this place should return false instead of one of the
enum values (which would be true).
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Fri, 8 Jan 2010 17:32:18 +0000 (18:32 +0100)]
mwl8k: move receive processing to tasklet
Like how TX reclaim is done in a tasklet, move receive processing
to tasklet context as well. This can have nice benefits for CPU
utilisation and throughput, especially at 3-stream rates.
(Use the same CLEAR_SEL trick as the TX reclaim tasklet does, to
avoid having to touch the interrupt mask registers.)
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Fri, 8 Jan 2010 17:32:01 +0000 (18:32 +0100)]
mwl8k: keep TX_DONE interrupt masked while transmit reclaim is running
By making use of the CLEAR_SEL feature of the mwl8k host interface
interrupt controller, we can keep the TX_DONE interrupt source masked
while the transmit reclaim tasklet is running (NAPI style) without
having to touch the interrupt controller's interrupt mask register
when entering or exiting polling mode, and without having to do any
more register reads/writes than we do now.
When CLEAR_SEL is enabled on the TX_DONE interrupt source, reading
the interrupt status register will clear the TX_DONE status bit if
it was set, allowing it to be set again if a new TX_DONE event arrives
while we are running the TX reclaim tasklet, but such a new event will
then not trigger another PCI interrupt until a zero is written to the
TX_DONE interrupt status register bit.
I.e., if we write a zero to the TX_DONE interrupt source bit in the
interrupt status register when the TX reclaim tasklet thinks it's
done, a PCI interrupt will be triggered if a new TX_DONE event arrived
from the hardware between us deciding that there is no more work to do
and re-enabling the TX_DONE interrupt source, thereby avoiding the
classic NAPI poll mode exit race that would otherwise occur.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Fri, 8 Jan 2010 17:31:47 +0000 (18:31 +0100)]
mwl8k: allow limiting the amount of transmit reclaim done
Add a limit argument to mwl8k_txq_reclaim(), to allow limiting the
number of packets that it will reclaim, and make it return the number
of packets that it reclaimed.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Fri, 8 Jan 2010 17:31:39 +0000 (18:31 +0100)]
mwl8k: basic AP interface support
Add support for creating AP interfaces, and enabling beaconing.
This allows running a basic AP (11b/g mode only for now).
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Fri, 8 Jan 2010 17:31:30 +0000 (18:31 +0100)]
mwl8k: correctly set the mac_type field for AP SET_MAC_ADDR
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lennert Buytenhek [Fri, 8 Jan 2010 17:30:58 +0000 (18:30 +0100)]
mwl8k: implement AP firmware station database maintenance
STA firmware uses UPDATE_STADB to manipulate the hardware station
database, whereas AP firmware uses SET_NEW_STN -- this implements the
latter, and hooks it into mwl8k_sta_notify(), to be used if we're
running on AP firmware.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>