Helmut Schaa [Thu, 8 Sep 2011 12:39:04 +0000 (14:39 +0200)]
rt2x00: Use the available helper functions to initialize the WCID table
Use rt2800_config_wcid and rt2800_delete_wcid_attr to initialize the
WCID table instead of writing to the registers directly.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Thu, 8 Sep 2011 12:38:36 +0000 (14:38 +0200)]
rt2x00: Forbid aggregation for STAs not programmed into the hw
If a STA is not known by the hw (i.e. has no WCID assigned) don't allow
aggregation since this might mess up tx status reports and we won't be
able to distinguish the reports of multiple WCID-less STAs.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Thu, 8 Sep 2011 12:38:01 +0000 (14:38 +0200)]
rt2x00: Make use of sta_add/remove callbacks in rt2800
This allows us to assign a WCID to each STA even for STAs without
crypto key.
To achieve this search for an unused WCID in the HW WCID table and
assign it to the according STA. When configuring a pairwise key for this
STA we don't need to write the MAC address and BSSIDX anymore but just
update the crypto related fields in the WCID_ATTR table.
This has two advantages:
1) Setting a new key for an already available STA (PTK rekeying) is
slightly less expensive and should improve performance in situations
where a lot of rekeying happens (e.g. a huge number of stations and/or
a small rekeying interval)
2) The TXWI now gets a WCID assigned for unencrypted frames which will
be reflected in the corresponding tx status report. This should make tx
status reports in unencrypted AP mode more reliable as we can
distinguish between multiple key-less STAs.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Thu, 8 Sep 2011 12:37:19 +0000 (14:37 +0200)]
rt2x00: Add WCID to HT TX descriptor
When sending an unencrypted frame to a STA the driver might want to pass
a suitable WCID since we don't have a key index to allow tx status
reports to get properly assigned to the correct STA.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Thu, 8 Sep 2011 12:36:45 +0000 (14:36 +0200)]
rt2x00: Add WCID to crypto struct
When a WCID was already assigned to a STA the key configuration
functions need to use the same WCID for configuring the keys. Hence, add
the WCID to the crypo configuration structure.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Thu, 8 Sep 2011 12:36:04 +0000 (14:36 +0200)]
rt2x00: Introduce sta_add/remove callbacks
This implements a basic sta_add and sta_remove callback. Introduce a new
structure rt2x00_sta and ask mac80211 to allocate it as private part of
its ieee80211_sta. rt2x00_sta only contains the WCID for now.
The sta_add callback allows the driver to assign a WCID to a station
that is currently being added. The same wcid is also passed to the
sta_remove callback one mac80211 removes this STA.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Thu, 8 Sep 2011 12:34:22 +0000 (14:34 +0200)]
rt2x00: Move bssidx calculation into its own function
This will be used by a later patch. No functional changes.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Shahar Levi [Thu, 8 Sep 2011 05:44:05 +0000 (08:44 +0300)]
mac80211: Update device channel in case of HW channel switch supported
The hw.conf.channel value is not updated properly for drivers that
support HW channel switch. Since the switch is done entirely by the
driver and we don't call ieee80211_hw_config(), this value remains
untouched. This patch fixes that by setting the new channel directly in
ieee80211_chswitch_work().
Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Thu, 8 Sep 2011 00:49:54 +0000 (17:49 -0700)]
mac80211: Mark all mesh stations as QoS capable
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Thu, 8 Sep 2011 00:49:53 +0000 (17:49 -0700)]
mac80211: Mesh data frames must have the QoS header
Per sec 7.1.3.5 of draft 12.0 of 802.11s, mesh frames indicate the
presence of the mesh control header in their QoS header.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Thu, 8 Sep 2011 00:49:52 +0000 (17:49 -0700)]
mac80211: Start implementing QoS support for mesh interfaces
In order to support QoS in mesh, we need to assign queue mapping only
after the next hop has been resolved, both for forwarded and locally
originated frames. Also, now that this is fixed, remove the XXX comment
in ieee80211_select_queue().
Also, V-Shy Ho reported that the queue mapping was not being applied to
the forwarded frame (fwd_skb instead of skb). Fixed that as well.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Wed, 7 Sep 2011 18:11:26 +0000 (20:11 +0200)]
rt2x00: Avoid unnecessary uncached
Reading the TX desciptor words from coherent memory is always uncached
and potentially slow. Hence, don't read the TX descriptor prior to
writing it since we update all fields anyway.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Wed, 7 Sep 2011 18:11:03 +0000 (20:11 +0200)]
rt2x00: Update some TX descriptor
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Wed, 7 Sep 2011 18:10:45 +0000 (20:10 +0200)]
rt2x00: Remove incorrect led blink
rt2800 devices are not capable of configuring arbitrary LED on/off
periods. The LED_CFG register fields ON_PERIOD and OFF_PERIOD are only
used by the hw when the LED mode is set to "blink upon TX".
Hence, remove the blink callback. This will result in software emulation
for LED blinking.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Wed, 7 Sep 2011 18:10:25 +0000 (20:10 +0200)]
rt2x00: Add LED_CFG register description
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Wed, 7 Sep 2011 18:10:02 +0000 (20:10 +0200)]
rt2x00: Minor optimizazion in txdone path
We can save an indirect function call + some instructions for fetching
the actual function pointer by passing the driver specific txwi pointer
directly from rt2800pci/rt2800usb to rt2800lib instead of using the
rt2800_drv_get_txwi callback.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 7 Sep 2011 09:50:48 +0000 (11:50 +0200)]
cfg80211: verify format of uAPSD information
The format is intended to be like the subfields
in the QoS Info field, verify that is the case.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:25 +0000 (09:31 -0700)]
iwlagn: fix compilation when debug flags is unset
Trivial fixes to allow compilation without warnings when debug
compilation flag isn't set.
Also fix the compilation when debugfs flag isn't set.
Fix a warning: unused priv pointer on the way.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Tue, 6 Sep 2011 16:31:24 +0000 (09:31 -0700)]
iwlagn: remove lines from the wrong place
Few lines for program bt_ch_announce being place in the wrong place. Remove those.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Tue, 6 Sep 2011 16:31:23 +0000 (09:31 -0700)]
iwlagn: enable 11n support for "_d" sku
"_d" SKU is 11n enabled device
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Tue, 6 Sep 2011 16:31:22 +0000 (09:31 -0700)]
iwlagn: disply queue read/write pointer when stuck
When driver detect queue stuck, display current read/write pointer before
perform frimware reload.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:21 +0000 (09:31 -0700)]
iwlagn: iwl-trans.c can't dereference iwl_priv any more
This reaches encapsulation for this file. In order to reach this:
* move priv->valid_context to iwl_shared
* move the last_rejected initialization to the upper layer
* define a wrapper iwl_nic_config in the upper layer that calls to
cfg->lib->ops->nic_config
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:20 +0000 (09:31 -0700)]
iwlagn: move traffic_log back to upper layer
The traffic log debugfs handlers were mistakenly moved to the
transport layer because they print the pointers of the Tx / Rx
queues. The pointers of the queues can be fetched by another debugfs
handler.
So bring the traffic log back to the upper layer and remove the part
that reads the Tx / Rx queues' pointers.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:19 +0000 (09:31 -0700)]
iwlagn: clean up of transport layer
Move a few declarations needed by the transport layer to iwl-shared.h
Move iwl_cmd_meta, iwl_tx_queue and friends to the internal transport
header file.
Move iwl_device_cmd iwl_host_cmd and friends to iwl-trans.h since
these structs are used in the API to the transport layer.
Move get_cmd_string to the upper layer with a declaration in
iwl-shared.h.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:18 +0000 (09:31 -0700)]
iwlagn: remove priv dereferences from the transport layer
Another round of clean up on the transport layer.
Define a wrapper around wiphy_rfkill_set_hw_state to prevent the
transport layer from accessing priv->hw.
Also move wait_command_queue to the transport layer.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:17 +0000 (09:31 -0700)]
iwlagn: merge iwl_pci_down and iwl_pci_remove
The latter was the only place that called the first. The two
functions were split when the iwl_pci_probe called iwl_pci_down
upon failure in the probe. Since iwl_pci_probe undoes its work by
itself, there is no need to split between iwl_pci_down, and
iwl_pci_remove.
Thanks to Pavel Roskin for pointing that out.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Tue, 6 Sep 2011 16:31:16 +0000 (09:31 -0700)]
iwlagn: only perform necessary calibration at init time
During init time, only the necessary calibration should be performed. This
not only save time, also avoid uCode crash because lack of necessary information.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Tue, 6 Sep 2011 16:29:51 +0000 (21:59 +0530)]
ath9k_hw: Fix magnitude/phase average in TxIQ Calibration
The commit "ath9k_hw: Fix Tx IQ Calibration hang issue in
AR9003 chips" did not consider more than one potential sample
while calculating magnitude/phase average if more than one
sample has the same value which could affect post-processing
of outlier detection that causes an undesirable Tx IQ
correction value will be assigned to tx gain settings where
outlier happens.
Cc: Kai Shi <kaishi@qca.qualcomm.com>
Reported-by: Paul Stewart <pstew@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Paul Stewart <pstew@google.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Tue, 6 Sep 2011 15:30:07 +0000 (21:00 +0530)]
ath9k: Move cycle conters under cc_lock
This patch protects cycle counters access by cc_lock
and also prints current sample index.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Tue, 6 Sep 2011 15:30:06 +0000 (21:00 +0530)]
ath9k: Take the samples in unassociated state
Currently the samples debugfs which maintains the snapshorts of
mac/bb only on associated state. Hence to cover issues on idle
state, the samples are taken whenever the driver is ready.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 6 Sep 2011 12:13:06 +0000 (14:13 +0200)]
mac80211: further optimise buffer expiry timer
Juuso optimised the timer to not run all the
time in commit
3393a608c4979a94d1887efc05b7.
However, after that it will still run once
more even if all frames just expired. Fixing
that also makes the function return value a
little clearer in the process.
Also, while at it, change the return value
to bool (instead of int).
Cc: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 4 Sep 2011 21:23:53 +0000 (23:23 +0200)]
b43: N-PHY: implement few random missing ops
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 4 Sep 2011 21:23:52 +0000 (23:23 +0200)]
b43: N-PHY: split workarounds into per-PHY-ver functions
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 4 Sep 2011 21:23:51 +0000 (23:23 +0200)]
b43: N-PHY: replace some hacks with nice tables ops
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 4 Sep 2011 21:18:22 +0000 (23:18 +0200)]
b43: N-PHY: use helper for checking IPA
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arik Nemtsov [Sun, 4 Sep 2011 08:11:32 +0000 (11:11 +0300)]
mac80211: add ssid config to bss information in AP-mode
Set SSID information from nl80211 beacon parameters. Advertise changes
in SSID to low level drivers.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 4 Sep 2011 07:11:46 +0000 (09:11 +0200)]
b43: LCN-PHY: load TX gain table on init
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 3 Sep 2011 19:01:02 +0000 (21:01 +0200)]
b43: add my copyrights and myself as the module author
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 3 Sep 2011 19:01:01 +0000 (21:01 +0200)]
b43: drop Copyright for not really copyrightable info
As discussed in "Licensing wlc_phy_radio.h and brcm80211" (Message-ID:
<AANLkTinQMRGkOvi4e4JMsHGV_BF_4Rf5oHCtZgQjwQ1g@mail.gmail.com>) content
of that file is not copyrightable, just names and numbers.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Sat, 3 Sep 2011 07:06:20 +0000 (09:06 +0200)]
minstrel_ht: fix Open BA session request floods
Minstrel HT tries very hard to establish a BA session with
each peer once there's some data on the way. However the
stack does not inform minstrel if an aggregation session
is already in place, so it keeps trying and wastes good
cycles in the tx status path.
[ 8149.946393] Open BA session requested for $AP tid 0
[ 8150.048765] Open BA session requested for $AP tid 0
[ 8150.174509] Open BA session requested for $AP tid 0
[ 8150.274376] Open BA session requested for $AP tid 0
...
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 2 Sep 2011 23:40:27 +0000 (01:40 +0200)]
ath9k: implement .get_antenna and .set_antenna
On MIMO chips this can be used to enable/disable hardware chains, ensuring
that the MCS information is updated accordingly.
On non-MIMO chips with rx diversity (e.g. 9285), this configures the rx
input antenna.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 2 Sep 2011 23:40:26 +0000 (01:40 +0200)]
ath9k: merge reset related functions
reduces unnecessary code duplication. Also takes the sc_pcu_lock within
ath_reset instead of callsites, which makes it possible to always cancel
all queued work items before the reset, possibly fixing a few race
conditions (work items vs reset) along with it.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 2 Sep 2011 23:40:25 +0000 (01:40 +0200)]
ath9k: always call ath_reset from workqueue context
This makes it much easier to add further rework to avoid race conditions
between reset and other work items.
Move other functions to make ath_reset static.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 2 Sep 2011 23:40:24 +0000 (01:40 +0200)]
ath9k: move a few functions around
Helps with making ath_reset static in the next commit
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 2 Sep 2011 23:40:23 +0000 (01:40 +0200)]
ath9k: eliminate common->{rx,tx}_chainmask
we already have ah->{rx,tx}chainmask for the same purpose
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 2 Sep 2011 08:21:59 +0000 (13:51 +0530)]
mac80211: stop tx before doing hw config and rate update
The assumption is that during the hw config, transmission was
already stopped by mac80211. Sometimes the AP can be switching
b/w the ht modes due to intolerant or etc where STA is in
the middle of transmission. In such scenario, buffer overflow
was observed at driver side. And also before updating the rate
control, the frames are continued to xmited with older rates.
This patch ensures that the frames are always xmitted with
updated rates and avoid buffer overflow.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 1 Sep 2011 20:49:57 +0000 (22:49 +0200)]
b43: N-PHY: implement enabling TX power control
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Tue, 6 Sep 2011 20:05:21 +0000 (13:05 -0700)]
mac80211: Stop forwarding mesh traffic when tx queues are full
Tx flow control for non-mesh modes of operation only needs to act on the
net device queues: when the hardware queues are full we stop accepting
traffic from the net device. In mesh, however, we also need to stop
forwarding traffic. This patch checks the hardware queues before
attempting to forward a mesh frame.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Pedersen [Thu, 1 Sep 2011 19:32:14 +0000 (12:32 -0700)]
mac80211: check if mesh frame is in RMC after decrypt
To check whether a frame is in the RMC, we need access to the mesh
header. This header is encrypted in encrypted data frames, so make this
check after the frame has been decrypted.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 20 Aug 2011 13:53:55 +0000 (15:53 +0200)]
mac80211: make ieee80211_send_bar available for drivers
To properly maintain the peer's block ack window, the driver needs to be
able to control the new starting sequence number that is sent along with
the BlockAckReq frame.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sven Neumann [Tue, 30 Aug 2011 21:38:54 +0000 (23:38 +0200)]
cfg80211: reorder code to obsolete forward declaration
Reorder functions to remove the need for a forward declaration
introduced by the last commit.
Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: linux-wireless@vger.kernel.org
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sven Neumann [Tue, 30 Aug 2011 21:38:53 +0000 (23:38 +0200)]
cfg80211: hold reg_mutex when updating regulatory
The function wiphy_update_regulatory() uses the static variable
last_request and thus needs to be called with reg_mutex held.
This is the case for all users in reg.c, but the function was
exported for use by wiphy_register(), from where it is called
without the lock being held.
Fix this by making wiphy_update_regulatory() private and introducing
regulatory_update() as a wrapper that acquires and holds the lock.
Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: linux-wireless@vger.kernel.org
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Pavel Roskin [Thu, 1 Sep 2011 15:54:12 +0000 (11:54 -0400)]
cfg80211: print bandwidth in chan_reg_rule_print_dbg()
Two spaces and the second "KHz" suggest that the code author meant to
print the bandwidth but forgot it. The code appears in commit
e702d3cf
already with two spaces and "KHz" in place of the bandwidth.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bill Jordan [Wed, 31 Aug 2011 21:51:00 +0000 (17:51 -0400)]
ath9k: ath9k_hw_set_txpowerlimit sets previous txpower
In commit
9c204b46c7af93e334114bea1f5eeaa6fea9ba07
(ath9k_hw: do not limit initial tx power to 20 dbm),
setting of txpower was broken.
This patch fixes it by initializing reg_pwr from the new
power limit, not the previous value.
Signed-off-by: Bill Jordan <bjordan@rajant.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 31 Aug 2011 21:36:21 +0000 (23:36 +0200)]
b43: LCN-PHY: add conditions for few operations
It was not possible to guess the conditions from MMIO dumps. Take them
from brcmsmac code.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 31 Aug 2011 21:36:20 +0000 (23:36 +0200)]
b43: LCN-PHY: rename functions, get rid of magic names
We've compared b43 with brcmsmac and took functions names from the
later.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 31 Aug 2011 21:36:19 +0000 (23:36 +0200)]
b43: LCN-PHY: upload additional 0x7 table
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 31 Aug 2011 21:36:18 +0000 (23:36 +0200)]
b43: LCN-PHY: rewrite 0x7 table at the end of init
This is not implemented in brcmsmac, but was noticed in (newer) wl. Can
be workaround for some hardware bug.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 31 Aug 2011 21:36:17 +0000 (23:36 +0200)]
b43: LCN-PHY: put tables functions in correct file
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 31 Aug 2011 21:36:16 +0000 (23:36 +0200)]
b43: LCN-PHY: minor fixes
The biggest change is reversing order of reading 32-bit table value.
MMIO dumps has shown it's done that way for LCN-PHY.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
zero.lin [Wed, 31 Aug 2011 18:43:52 +0000 (20:43 +0200)]
rt2x00: Add new chipset support
Signed-off-by: zero.lin <zero.lin@ralinktech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Wed, 31 Aug 2011 13:01:48 +0000 (16:01 +0300)]
nl80211/cfg80211: add match filtering for sched_scan
Introduce filtering for scheduled scans to reduce the number of
unnecessary results (which cause useless wake-ups).
Add a new nested attribute where sets of parameters to be matched can
be passed when starting a scheduled scan. Only scan results that
match any of the sets will be returned.
At this point, the set consists of a single parameter, an SSID. This
can be easily extended in the future to support more complex matches.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eliad Peller [Wed, 31 Aug 2011 08:29:43 +0000 (11:29 +0300)]
nl80211/cfg80211: add WIPHY_FLAG_AP_UAPSD flag
add WIPHY_FLAG_AP_UAPSD flag to indicate uapsd support on
AP mode.
Advertise it to userspace by including a new
NL80211_ATTR_SUPPORT_AP_UAPSD attribute.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Wed, 31 Aug 2011 06:38:30 +0000 (09:38 +0300)]
iwlwifi: signedness bug in iwl_trans_pcie_tx_agg_alloc()
unsigned shorts and unsigned chars are never == -1.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Wed, 31 Aug 2011 06:37:42 +0000 (09:37 +0300)]
iwlwifi: fix double assign in iwl_start_tx_ba_trans_ready()
"vif" is assigned twice. We can remove the first one.
This silences a Smatch warning that "ctx" could be one step past the
end of the priv->contexts[] array.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Wed, 31 Aug 2011 05:17:30 +0000 (10:47 +0530)]
ath9k_hw: Fix rx latency of 11a mode
Rx latecy to start signal(usec) of 11a is 41 not 37 and
also corrected the rx delay in quarter rate.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Tue, 30 Aug 2011 19:16:15 +0000 (22:16 +0300)]
mac80211: handle allocation failures in mesh_pathtbl_init()
The calls to kzalloc() weren't checked here and it upsets the static
checkers. Obviously they're not super likely to fail, but we might
as well add some error handling.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arik Nemtsov [Tue, 30 Aug 2011 06:32:38 +0000 (09:32 +0300)]
mac80211: add flag to indicate HW only Tx-agg setup support
When this flag is set, Tx A-MPDU sessions will not be started by
mac80211. This flag is required for devices that support Tx A-MPDU setup
in hardware.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Joe Perches [Mon, 29 Aug 2011 21:17:41 +0000 (14:17 -0700)]
wireless: Remove unnecessary OOM logging messages
Removing unnecessary messages saves code and text.
Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Joe Perches [Mon, 29 Aug 2011 21:17:34 +0000 (14:17 -0700)]
rfkill: Remove unnecessary OOM logging messages
Removing unnecessary messages saves code and text.
Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Joe Perches [Mon, 29 Aug 2011 21:17:31 +0000 (14:17 -0700)]
mac80211: Remove unnecessary OOM logging messages
Removing unnecessary messages saves code and text.
Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Mon, 29 Aug 2011 20:23:09 +0000 (13:23 -0700)]
mac80211: Consolidate mesh path duplicated functions
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Mon, 29 Aug 2011 20:23:08 +0000 (13:23 -0700)]
mac80211: Consolidate {mesh,mpp}_path_flush into one function
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Mon, 29 Aug 2011 20:23:07 +0000 (13:23 -0700)]
mac80211: Don't iterate twice over all mpaths when once in sufficient
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Mon, 29 Aug 2011 20:23:06 +0000 (13:23 -0700)]
mac80211: Remove redundant mesh path expiration checks
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Mon, 29 Aug 2011 20:23:05 +0000 (13:23 -0700)]
mac80211: Improve mpath state locking
No need to take the mpath state lock when an mpath is removed.
Also, no need checking the lock when reading mpath flags.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Mon, 29 Aug 2011 20:23:04 +0000 (13:23 -0700)]
mac80211: Remove mesh paths when an interface is removed
When an interface is removed, the mesh paths associated with it should
also be removed.
This fixes a bug we observed when reloading a device driver module
without reloading mac80211s.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Mon, 29 Aug 2011 20:23:03 +0000 (13:23 -0700)]
mac80211: Fix RCU pointer dereference in mesh_path_discard_frame()
Reported by Pedro Larbig (ASPj)
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Yogesh Ashok Powar [Mon, 29 Aug 2011 20:21:10 +0000 (13:21 -0700)]
mwifiex: replace kmalloc & memcpy sequence with kmemdup
Sequence of kmalloc/kzalloc and memcpy is replaced with
kmemdup.
Cc: Walter Harms <wharms@bfs.de>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Mon, 29 Aug 2011 16:57:54 +0000 (18:57 +0200)]
ath9k: fix checks for first subframe delimiter padding
The commit "ath9k_hw: Fix exceed transmission burst-time of 5GHz" added
a padding of 60 delimiters on the first subframe to work around an issue
on AR9380, but it lacked the checks to prevent it from being applied to
pre-AR9380, enterprise AR9380 or AR9580+
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Yogesh Ashok Powar [Mon, 29 Aug 2011 11:42:44 +0000 (17:12 +0530)]
mwl8k: Set hardware flag IEEE80211_HW_AP_LINK_PS
This will avoid mac80211 to trigger PS mode for connected station
based on the PM bit of incoming frames. AP firmware is capable of
handling such frames and buffering TX frames destined to the
stations that are in PS mode.
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Mon, 29 Aug 2011 11:39:47 +0000 (13:39 +0200)]
ath9k_hw: fix the last register write for ar5416 addac
The previous register used in these initvals was probably accidentally
copied over from the AR9100 values.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Mon, 29 Aug 2011 11:39:46 +0000 (13:39 +0200)]
ath9k_hw: drop an unused column in AR5008-AR9002 initvals
It was used for the defunct 'turbo' mode which was never implemented in the
driver. Saves ~7.5k uncompressed
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vivek Natarajan [Mon, 29 Aug 2011 08:53:03 +0000 (14:23 +0530)]
cfg80211/nl80211: Indicate roaming feature capability to userspace.
When the rssi of the current AP drops, both wpa_supplicant and the
firmware may do a background scan to find a better AP and try to
associate. Since firmware based roaming is faster, inform
wpa_supplicant to avoid roaming and let the firmware decide to
roam if necessary.
For fullmac drivers like ath6kl, it is just enough to provide the
ESSID and the firmware will decide on the BSSID. Since it is not
possible to do pre-auth during roaming for fullmac drivers, the
wpa_supplicant needs to completely disconnect with the old AP and
reconnect with the new AP. This consumes lot of time and it is
better to leave the roaming decision to the firmware.
Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sun, 28 Aug 2011 19:11:01 +0000 (21:11 +0200)]
mac80211: retry sending failed BAR frames later instead of tearing down aggr
Unfortunately failed BAR tx attempts happen more frequently than I
expected, and the resulting aggregation teardowns cause performance
issues, as the aggregation session does not always get re-established
properly.
Instead of tearing down the entire aggr session, we can simply store the
SSN of the last failed BAR tx attempt, wait for the first successful
tx status event, and then send another BAR with the same SSN.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 28 Aug 2011 17:59:28 +0000 (19:59 +0200)]
b43: LCN-PHY: implement saving and restoring PHY & radio configuration
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 28 Aug 2011 16:47:23 +0000 (18:47 +0200)]
bcma: extract some basic info about board from SPROM
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 28 Aug 2011 16:47:22 +0000 (18:47 +0200)]
ssb: use u16 for storing board rev
Specs say about size 2 (u16) and my 14e4:4727 has board rev 0x1211.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 28 Aug 2011 12:59:58 +0000 (14:59 +0200)]
b43: LCN-PHY: prepare functions for channel switching
Switching is not fully implemented yet, prepare place for the code.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 28 Aug 2011 12:28:44 +0000 (14:28 +0200)]
b43: LCN-PHY: implement more PHY ops before radio init
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 28 Aug 2011 12:28:43 +0000 (14:28 +0200)]
b43: LCN-PHY: add R/W ops for PHY and radio
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 27 Aug 2011 23:52:10 +0000 (01:52 +0200)]
ath9k_hw: do not apply the 2.4 ghz ack timeout workaround to cts
It is only used to workaround interoperability issues related to longer
delays in receiving the block ack, so it is not necessary to apply it
to the CTS exchange.
Should improve throughput slightly, especially when there are lots
of retransmissions.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Tue, 6 Sep 2011 19:10:43 +0000 (12:10 -0700)]
mac80211: Defer tranmission of mesh path errors
Under failure conditions, the mesh stack sends PERR messages to the
previous sender of the failed frame. This happens in the tx feedback
path, in which the transmission queue lock may be taken. Avoid a
deadlock by sending the path error via the pending queue.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Greg Dietsche [Sun, 28 Aug 2011 13:22:38 +0000 (08:22 -0500)]
iwlwifi: iwl-agn-rs.c: remove old comment
this comment refers to some code that was removed.
Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 27 Aug 2011 22:32:25 +0000 (00:32 +0200)]
ath9k: defer ath_tx_setup_buffer setup to the first tx attempt during aggr
With sequence number and buffer allocation deferred to when they're needed
for the first time, it becomes much easier to start dropping packets from
the tid queue if necessary, e.g. when latency suddenly increases. This can
lead to some future improvements in buffer management for better latency.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 27 Aug 2011 22:32:24 +0000 (00:32 +0200)]
ath9k: move seqno allocation in the tx path to ath_tx_setup_buffer
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 27 Aug 2011 22:32:23 +0000 (00:32 +0200)]
ath9k: move the sequence number from ath_frame_info to ath_buf
It is only necessary for BAW tracking and moving it to the ath_buf
makes it easier to add further improvements, such as deferring
seqno allocation in the aggregation path.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 27 Aug 2011 22:32:22 +0000 (00:32 +0200)]
ath9k: clean up the aggregation tid queue
Use a sk_buff_head instead containing skbs instead of a list_head
containing ath_bufs. This makes it easier to decouple the aggregation
code from the ath_buf struct
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 27 Aug 2011 22:32:21 +0000 (00:32 +0200)]
ath9k: use u8 for the tx key index
This saves some space in struct ath_frame_info
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Joe Perches [Fri, 26 Aug 2011 08:56:39 +0000 (01:56 -0700)]
ath: Make ath_printk void not int and remove unused struct ath_common *
Changing the return type and removing the unused argument from
ath_printk reduces code size.
Add an __always_unused struct ath_common * to the macros
that call ath_printk to avoid unused variable warnings.
$ size drivers/net/wireless/ath/built-in.o*
text data bss dec hex filename
1159859 16235 212000 1388094 152e3e drivers/net/wireless/ath/built-in.o.new
1164175 16235 212032 1392442 153f3a drivers/net/wireless/ath/built-in.o.old
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>