Arik Nemtsov [Wed, 28 Nov 2012 09:42:44 +0000 (11:42 +0200)]
wlcore: don't take mutex before stopping queues
Protect all functions touching queue_stop_reasons by spin-lock, since
they are accessed by op_tx. Now there's no need to take the mutex
before caling wlcore_queue_xxx functions.
Arik Nemtsov [Thu, 29 Nov 2012 22:48:03 +0000 (00:48 +0200)]
wlcore: use separate HW queue for each AC in each vif
Start using the new hw_queue mechanism in mac80211 and give each AC in
each vif its own hw_queue number. This allows us to stop an AC in a vif
independently from other vifs.
Change the Tx watermark handling functions to count packets per AC in
vif. From now on fast links should not be able to hurt the throughput
of slow links on the same AC but on different vifs.
Change internal queue mgmt functions to operate per vif, to support the
new Tx watermark granularity. Make the global versions of the queue
stop/start functions to use the global mac80211 API for queue mgmt. This
helps in situations where the driver currently doesn't know all the vifs
that reside in mac80211. Recovery is a good example for such a case.
[Moved hw_base_queue addition into the wlcore_tx_get_mac80211_queue()
function; changed WARN_ONs to WARN_ON_ONCEs; simplified for loops;
fixed new checkpatch warnings. -- Luca]
Arik Nemtsov [Wed, 28 Nov 2012 09:42:42 +0000 (11:42 +0200)]
wlcore: use link count for single-STA-PSM optimization
Only allow a PSM STA to congest FW memory when it is the single active
link. Being a single STA doesn't imply a single link - there might be
other links on other roles.
Arik Nemtsov [Wed, 28 Nov 2012 09:42:41 +0000 (11:42 +0200)]
wl18xx: limit Tx for the AP single-STA-in-PSM case
Treat a single connected STA in PSM as a slow link and regulate Tx speed
according to slow link priority/stop thresholds.
This allows us to avoid flooding the FW, while delivering decent
throughput to a peer in forced-PSM.
[Small simplification of the if statements -- Luca]
Arik Nemtsov [Wed, 28 Nov 2012 09:42:40 +0000 (11:42 +0200)]
wlcore/wl18xx: change priority calculations for links
Update the 18xx FW status private part to include Tx related link
priorities. Introduce new HW ops to determine link priority per chip
family.
For 18xx the changes are:
- Suspended links are at most low priority and Tx for them is stopped
beyond the suspend threshold.
- Active links now get their thresholds directly from FW
- There's a new "stop" threshold for active links, at which point a link
stops receiving new packets.
Update the min 18xx FW version required to make sure suspended links
bitmap is advertised by the FW.
Arik Nemtsov [Wed, 28 Nov 2012 09:42:36 +0000 (11:42 +0200)]
wlcore: set 5Ghz probe-req template for DFS channels
Even passive scans on DFS channels require us to send probe requests, so
configure the probe-req in this case.
Also use this opportunity to prevent the code from crashing in case no
SSIDs are sent from above. This will likely happen in the DFS case
introduced. Even a passive scan might need the probe request configured
because of DFS channels.
Arik Nemtsov [Wed, 28 Nov 2012 09:42:35 +0000 (11:42 +0200)]
wlcore: improve handling for Rx errors
Treat Rx error code as a bitmask. This allows sending MIC failures
when other error bit are on.
Align Rx descriptor status mask to the FW definition.
Ease debugging in case FW reports failure to decrypt on packets.
Discard corrupted packets early in Rx path to avoid reporting other
abnormalities with corrupted packets that also have other failure bytes on.
Namely - we don't want to get a MIC failure on a corrupted packet.
This is mandated by the WiFi specification - see
section 11.4.2.4.1 in 802.11-2012.
Eyal Shapira [Sat, 8 Dec 2012 00:58:23 +0000 (02:58 +0200)]
wlcore: increase scan dwell times if no activity
There's a limit on scan dwell times of max 30ms in order
to avoid degrading voip traffic which could be going on
while scanning. However these dwell times increase the
chance of missing out on nearby APs leading to partial
scan results. Allow configuration of longer dwell times
in case there no active interface (i.e. no STA associated
or AP up).
[Arik - count started vifs using an in-driver function]
[Fixed some new checkpatch warnings regarding comments in the
networking subsystem. -- Luca]
Eliad Peller [Wed, 28 Nov 2012 09:42:31 +0000 (11:42 +0200)]
wlcore: add ACX_PEER_CAP command
ACX_PEER_CAP command is just ACX_PEER_HT_CAP, but allows
configuring the peer's support rates as well.
this is needed because we start the station role when
the remote rates are not known yet.
the two commands should be unified in future fw versions,
but for now add a new set_peer_cap per-hw op, that will
use ACX_PEER_CAP for 18xx, and ACX_PEER_HT_CAP for 12xx.
Arik Nemtsov [Tue, 27 Nov 2012 06:45:00 +0000 (08:45 +0200)]
wlcore: improved Tx scheduling algorithm
Prioritize EDCA by choosing the AC before anything else. Use the
fast/slow link bitmap in FW to improve the scheduling algorithm for
the multi-link scenario.
Set packet thresholds to determine if a given link is high or low
priority according to its speed. A slow link will be given high priority
if the amount of packets queued for it in the FW is lower than the
slow-threshold. Similarly, a fast link will be given high priority if
the number of its packets queued in FW is smaller than the high-threshold.
The improved algorithm:
1. Choose optimal AC according to FW utilization
2. Traversing the VIFs in a round-robin fashion, try to choose a high
priority link. Links are traversed in a round-robin fashion inside a
VIF.
3. If no high priority links are found, choose the first non-empty
(low priority) link found in the round robin.
Arik Nemtsov [Tue, 27 Nov 2012 06:44:59 +0000 (08:44 +0200)]
wlcore: track FW-allocated packets per link
Move FW-allocation tracking code to the fw_status function and track
allocations made by all links. These will be incorporated in the
improved Tx scheduling algorithm.
Manually zero the system link counters on op_stop, as this link is not
allocated the normal way.
Arik Nemtsov [Tue, 27 Nov 2012 06:44:58 +0000 (08:44 +0200)]
wlcore: count packets held per AC in each vif
This accounting will help find a vif that has data in a specific AC.
Otherwise we have to traverse all the links, which can be lengthy for
the AP case.
When a link is allocated, sometimes the "freed packets" counter in FW
is non zero, but we always assumed it is. This caused us to incorrectly
account FW allocated blocks in some cases.
When operating in AP mode, this bug caused some stations to never
come back from PSM.
wlcore allocates two static structs wl1271_band_2ghz & wl1271_band_5ghz
which are used/modified by Reg-Domain e.g. some channel might be marked
as passive at some point. Make sure we don't keep stale settings around
if the HW is unregistered/registered during operation.
[Arik - use Tx-power constant and tweak commit message]
Arik Nemtsov [Tue, 27 Nov 2012 06:44:54 +0000 (08:44 +0200)]
wlcore: consolidate free_link and always call it
Make sure free_link is always called when removing an interface. This
ensures all skbs belonging to this interface are returned to mac80211.
Otherwise these dangling skbs might crash the system on the next
call to wl1271_tx_reset_link_queues(). This happens on recovery/stop or
an unsuccessful Tx flush.
wlcore: remove unnecessary WARN_ON in wl12xx_tx_reset
Sometimes the driver can perform a recovery while Tx is
active, this will trigger unnecessary warning which might
delay the recovery for more than 100 mS.
Arik Nemtsov [Tue, 27 Nov 2012 06:44:48 +0000 (08:44 +0200)]
wlcore: clear roc_vif on iface removal
When removing an interface currently performing a ROC operation, clear
the current ROC state. This is useful especially during recovery and
keeps mac80211 in sync to our state.
Eliad Peller [Tue, 27 Nov 2012 06:44:46 +0000 (08:44 +0200)]
wlcore: allow ACX_BA_SESSION_RX_SETUP to fail
Under some circumstances, that fw might be asked to
remove a rx ba sessions it doesn't know about. In
this case, instead of triggering a recovery, accept
the error code (CMD_STATUS_NO_RX_BA_SESSION) and
ignore it.
[Arik - indicate failure up when the BA session cannot be setup]
Eliad Peller [Tue, 27 Nov 2012 06:44:45 +0000 (08:44 +0200)]
wlcore: allow fw commands to fail
Currently, each fw command/acx that return a status code
different than CMD_STATUS_SUCCESS will trigger a recovery
in the driver.
However, it is a valid for some fw commands to fail (e.g.
due to temporary lack of resources), so add new functions
that allow passing bitmap of valid error return values.
(make the current wl1271_cmd_send/wl1271_cmd_configure
wrappers around the new functions, in order to avoid
changing the whole driver)
Luciano Coelho [Tue, 27 Nov 2012 13:52:01 +0000 (15:52 +0200)]
wl18xx: ignore irrelevant firmware version fields
For wl18xx, only the chip ID and the minor version number are
relevant. Ignore the other numbers which are either not used or
relate to internal projects or internal branches.
Luciano Coelho [Tue, 27 Nov 2012 13:51:59 +0000 (15:51 +0200)]
wl12xx: ignore some of the firmware version fields
The firmware type and the project number fields in the firmware
version number, cannot be checked as if they increase sequentially,
because the former is the firmware type and the latter is an internal
project number. There's no guarantee that these numbers will remain
incremental, so use WLCORE_FW_VER_IGNORE.
Luciano Coelho [Tue, 27 Nov 2012 13:51:58 +0000 (15:51 +0200)]
wlcore: change way of checking the firmware version
The firmwares version string contain 5 integers. We used to consider
all the digits (except for the first one, which indicates the chip) as
linearly increasing version numbers. This is not correct, because
some of the integers indicate type of firmware (eg. single-role
vs. multi-role) or the internal project it was created for.
Besides, this varies a bit from chip to chip, so we need to make the
firmware version checks more flexible (eg. allow the lower driver to
ignore some of the integers). Additionally, we need to change the
code so that we only check for a linearly increasing number on the
fields where this actually makes sense.
Luciano Coelho [Tue, 27 Nov 2012 13:51:57 +0000 (15:51 +0200)]
wlcore/wl12xx: remove deprecated FW version check
We don't distinguish between STA and AP firmwares anymore, so the
firmware version checking and quirks setting in wl12xx isn't needed
anymore.
Remove implementation of .identify_fw in wl12xx and deprecated
definitions. Don't remove the op entirely from wlcore, because it may
be needed for more fine-grained checking later.
Luciano Coelho [Tue, 27 Nov 2012 13:51:56 +0000 (15:51 +0200)]
wlcore/wl12xx: move wl12xx chip ID defines to the lower driver
Move wl12xx-specific chip ID macros to the wl12xx driver and rename
them to 127X and 128X for clarity since both the "1" (2.4GHz) and the
"3" (2.4GHz and 5GHz) variants use the same chip ID.
Luciano Coelho [Mon, 26 Nov 2012 16:05:49 +0000 (18:05 +0200)]
wlcore: gather information about firmware stability
It's sometimes useful to gather information about the firmware
stability in long test runs, especially to see if problems are
recurring frequently or not. With this commit we count the number of
times a hardware recovery was issued and print it out during recovery
and in the driver_state in debugfs.
Eliad Peller [Mon, 26 Nov 2012 16:05:47 +0000 (18:05 +0200)]
wlcore: move ps change handling to .bss_info_changed()
Adapt the new mac80211 BSS_CHANGED_PS notification,
and do the ps handling in mac80211's per-vif
callback (.bss_info_changed), rather than in
the per-device (.config) callback.
Eliad Peller [Mon, 26 Nov 2012 16:05:45 +0000 (18:05 +0200)]
wlcore: use sta_state-based ROCs for AP mode
Try an opportunistic ROC when a STA is first added and stop the ROC when
the STA is removed or successfully authenticated. This would ensure we
don't miss auth/assoc/EAPOL packets during connection
Arik Nemtsov [Mon, 26 Nov 2012 16:05:44 +0000 (18:05 +0200)]
wlcore/wl18xx/wl12xx: separate channel count between chips
18xx chips are capable of staying on 2 channels at the same time.
Introduce a chip-family specific parameter to set the number of channels
in the interface-combinations published by the driver.
mwl8k: remove useless pci shutdown callback and stray debugging
This patch removes a left over debugging print present in the pci
shutdown callback, since this callback does not do anything useful, get
rid of it entirely.
Signed-off-by: Florian Fainelli <ffainelli@freebox.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gabor Juhos [Sun, 2 Dec 2012 17:34:47 +0000 (18:34 +0100)]
rt2x00: rt2800lib: introduce RFCSR3_VCOCAL_EN
On the RF3290,RF5360,RF5370,RF5372,RF5390,RF5392
radio frontends, the VCO calibration can be
controlled via the RFCSR3 register. The current
code uses the RFCSR30_RF_CALIBRATION constant to
enable the calibration, however that belongs to
the RFCSR30 register. Although the values of the
constant is correct, but using that for another
register is confusing.
Add a new definition for the VCO calibration enable
bit of the RFCSR3 register and use that in the
relevant places in order to avoid confusions.
The patch contains no functional changes.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gabor Juhos [Sun, 2 Dec 2012 16:24:02 +0000 (17:24 +0100)]
rt2x00: rt2800lib: remove trailing semicolons from RFCSR3_* defines
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
On A-MPDU frames, the hardware only reports valid
signal strength data for the last subframe.
This patch fixes it by flagging everything but the
last subframe in an A-MPDU to tell mac80211 to
ignore the signal strength entirely. Otherwise
the empty value (= 0 dbm) will distort the
average quite badly.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gabor Juhos [Sun, 2 Dec 2012 14:53:29 +0000 (15:53 +0100)]
rt2x00: rt2800lib: fix indentation in rt2800_init_rfcsr
The patch contains no functional changes.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gabor Juhos [Sun, 2 Dec 2012 14:53:28 +0000 (15:53 +0100)]
rt2x00: rt2800lib: fix indentation of some rt2x00_rt calls
The patch contains no functional changes.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Sun, 2 Dec 2012 10:36:09 +0000 (13:36 +0300)]
p54: potential signedness issue in p54_parse_rssical()
"entries" is unsigned here, so it is never less than zero. In theory,
len could be less than offset so I have added a check for that.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bluetooth: trivial: Change NO_FCS_RECV to RECV_NO_FCS
Make code more readable by changing CONF_NO_FCS_RECV which is read
as "No L2CAP FCS option received" to CONF_RECV_NO_FCS which means
"Received L2CAP option NO_FCS". This flag really means that we have
received L2CAP FRAME CHECK SEQUENCE (FCS) OPTION with value "No FCS".
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Bluetooth: Process receiving FCS_NONE in L2CAP Conf Rsp
Process L2CAP Config rsp Pending with FCS Option 0x00 (No FCS)
which is sent by Motorola Windows 7 Bluetooth stack. The trace
is shown below (all other options are skipped).
If L2CAP_FEAT_FCS is not supported we sould miss EWS option
configuration because of break. Make code more readable by
combining FCS configuration in the single block.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Bluetooth: AMP: Mark controller radio powered down after HCIDEVDOWN
After getting HCIDEVDOWN controller did not mark itself as 0x00 which
means: "The Controller radio is available but is currently physically
powered down". The result was even if the hdev was down we return
in controller list value 0x01 "status 0x01 (Bluetooth only)".
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
In order to authenticate and configure an incoming SCO connection, the
BT_DEFER_SETUP option was added. This option is intended to defer reply
to Connect Request on SCO sockets.
When a connection is requested, the listening socket is unblocked but
the effective connection setup happens only on first recv. Any send
between accept and recv fails with -ENOTCONN.
Seth Forshee [Thu, 29 Nov 2012 13:36:00 +0000 (07:36 -0600)]
brcmsmac: Fix possible NULL pointer dereference in _dma_ctrlflags()
There's a debug message to warn if this function is passed a NULL
pointer, but in order to print the message we have to dereference the
pointer. Obviously this isn't a good idea, so remove the message.
Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Thu, 29 Nov 2012 22:27:17 +0000 (23:27 +0100)]
rtlwifi: use SIMPLE_DEV_PM_OPS
rtlwifi only provides pm callbacks for functions covered by pm sleep
and they are also just called if CONFIG_PM_SLEEP is set.
Only add functions rtl_pci_suspend and rtl_pci_resume if
CONFIG_PM_SLEEP is set and use SIMPLE_DEV_PM_OPS instead of
manually filling struct dev_pm_ops.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Thu, 29 Nov 2012 22:27:16 +0000 (23:27 +0100)]
p54pci: use SIMPLE_DEV_PM_OPS
p54pci does not provide any runtime pm callbacks, so support for
PM_RUNTIME is not needed and we could go to PM_SLEEP.
This also makes it possible to use SIMPLE_DEV_PM_OPS instead of
manually filling struct dev_pm_ops.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Thu, 29 Nov 2012 22:27:15 +0000 (23:27 +0100)]
ath9k: use SIMPLE_DEV_PM_OPS
ath9k does not provide any runtime pm callbacks, so support for
PM_RUNTIME is not needed and we could go to PM_SLEEP.
This also makes it possible to use SIMPLE_DEV_PM_OPS instead of
manually filling struct dev_pm_ops.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Stamer [Thu, 29 Nov 2012 16:09:26 +0000 (17:09 +0100)]
rtlwifi: rtl8192se: Fixed coding style issues in the driver
This patch fixes almost all coding issues in the rtl8192se driver. Only
exception is putting trailing */ on separate lines.
Signed-off-by: Daniel Stamer <daniel@stamer.info> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 28 Nov 2012 20:53:45 +0000 (21:53 +0100)]
mwifiex: fix struct member mismatch
Using bss->information_elements and treating
bss->len_beacon_ies as its size is wrong, the
real size is len_information_elements.
Found while I was reviewing the use of this
cfg80211 API (as it is actually potentially
broken due to races.)
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Wed, 28 Nov 2012 20:44:14 +0000 (21:44 +0100)]
brcmfmac: change debug output for received event.
see header.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Wed, 28 Nov 2012 20:44:13 +0000 (21:44 +0100)]
brcmfmac: fix bug in setting mgmt ie and parsing vndrs ie.
Parsing vndrs ie was not taking len of tlv itself in account. Setting
mgmt ie was missing check for length indicating non configured ie and
wrongly checking available length.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Wed, 28 Nov 2012 20:44:12 +0000 (21:44 +0100)]
brcmfmac: remove mode from struct brcmf_cfg80211_conf
The mode should be stored and used per virtual interface. Remove
the mode from device global structure and rework the code to use
the mode from brcmf_cfg80211_vif.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Wed, 28 Nov 2012 20:44:11 +0000 (21:44 +0100)]
brcmfmac: get rid of struct brcmf_cfg80211_info::link_up attribute
This attribute indicates successful IBSS or AP connection has been
established. However, this no longer works for virtual interfaces.
As it turns out this attribute is identical to the CONNECTED bit
in struct brcmf_cfg80211_vif::sme_state. This patch removes the
attribute and rework some functions relying on it.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Piotr Haber [Wed, 28 Nov 2012 20:44:10 +0000 (21:44 +0100)]
brcmsmac: support 4313iPA
Add support for 4313 iPA variant.
It is a variant of already supported 4313 ePA
and needs some PHY changes to work properly.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Piotr Haber [Wed, 28 Nov 2012 20:44:09 +0000 (21:44 +0100)]
brcmsmac: move PHY functions
Move functions in
preparation for 4313iPA changes
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Piotr Haber [Wed, 28 Nov 2012 20:44:07 +0000 (21:44 +0100)]
brcmsmac: fix bounds checking in tx/rx
brcms_b_txstatus and brcms_b_recv are off by one when
doing bounds checking on number of packets to process
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Piotr Haber [Wed, 28 Nov 2012 20:44:06 +0000 (21:44 +0100)]
brcmsmac: cleanup in isr code
brcms_c_isr returns true if interrupt was for us
and if dpc should be scheduled which is the same thing.
Simplify it.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Piotr Haber [Wed, 28 Nov 2012 20:44:05 +0000 (21:44 +0100)]
brcmsmac: handle packet drop during transmit correctly
The .tx() callback function can drop packets when there is no
space in the DMA fifo. Propagate that information to caller
and make sure the freed sk_buff reference is not accessed.
Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
wireless: allow Atheros card to not depend on ath.ko
There are 2 different things:
- sub-menu for "Atheros Wireless cards" family
- module ath.ko with common Atheros code
Until now, they both used to depend on the same Kconfig variable ATH_COMMON.
Thus, being "Atheros card" and "depending on ath.ko" was the same.
To allow module to belong to the
"Atheros Wireless cards" family but not use ath.ko,
2 conditions above need to be separated.
So, this patch introduce new Kconfig variable ATH_CARDS for belonging
to the "Atheros Wireless Cards" family; while ATH_COMMON becomes hidden
variable to express dependency on common Atheros code in ath.ko. Modules
that depend on this common code now express it by setting ATH_COMMON.
Right now, ath6kl do not depend on common code and thus do not set ATH_COMMON.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Wed, 28 Nov 2012 09:28:52 +0000 (10:28 +0100)]
rt2x00: Use addr_mask to disallow invalid MAC addresses in mutli-bssid mode
Reported-by: Petr Stetiar <ynezz@true.cz> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The commit "ath9k: stomp audio profiles on weak signal
strength" failed to take care of new stomp type while
programming concurrent tx priority. That leads to array
index out of bounds access.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Mon, 26 Nov 2012 23:31:55 +0000 (00:31 +0100)]
ssb: extif: fix compile errors
If CONFIG_SSB_EMBEDDED or CONFIG_SSB_DRIVER_MIPS is set and
CONFIG_SSB_DRIVER_EXTIF is not set, it will cause compile problems
because of missing functions. This patch fixes these problems.
The mips driver now also uses ssb_chipco_available() instead of
checking bus->chipco.dev manually.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Mon, 26 Nov 2012 23:30:04 +0000 (00:30 +0100)]
bcma: handle return value of pci_assign_resource
This fixes the following warning:
CC drivers/bcma/driver_pci_host.o
drivers/bcma/driver_pci_host.c: In function 'bcma_core_pci_fixup_addresses':
drivers/bcma/driver_pci_host.c:555:23: error: ignoring return value of
'pci_assign_resource', declared with attribute warn_unused_result
[-Werror=unused-result]
Reported-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arik Nemtsov [Mon, 26 Nov 2012 16:05:41 +0000 (18:05 +0200)]
wlcore: use new set bandwidth command to adjusting channel BW
We support changing the channel BW when we started the STA role on
a 40Mhz bandwidth. Otherwise a reconnection is required.
Save the started channel width and use it when channel width updates
arrive.
Eliad Peller [Thu, 22 Nov 2012 16:06:23 +0000 (18:06 +0200)]
wlcore: call ieee80211_sched_scan_stopped on interface removal
The interface might go down before we got the SCHED_STOPPED
event, so make sure to call ieee80211_sched_scan_stopped()
if the scanned interface is removed.
Replace sched_scanning with sched_vif in order to save
the scanned interface.
In 18xx the calibration process of the PHY Cortex domain
requires to perform an active calibration of the channel
before it can be used for transmission. To fulfill world
wide regulatory restrictions, fw should be always
synchronized/updated with current CRDA configuration.
Add a new "CMD_DFS_CHANNEL_CONFIG" command to update the
fw with current reg-domain, this command passes a bit map
of channels that are allowed to be used for transmission.
The driver shall update the fw during initialization and
after each change in the current reg-domain
configuration. The driver will save the channel number of
incoming beacons during the scan process, as they might
be a result of the passive scan on
"IEEE80211_CHAN_PASSIVE_SCAN" channel and will update the
fw accordingly once the scan is finished, the purpose of
this is to be ready in case of the authentication request
on one of these disabled (uncalibrated) channels.
The new command requires to wait for the fw completion
event "DFS_CHANNELS_CONFIG_COMPLETE_EVENT".
No scan commands (including the sched scan) can be
executed concurrently with the "CMD_DFS_CHANNEL_CONFIG",
wl->mutex ensures that.
[Arik - move reset of reg_ch_conf_last to safe place inside
op_stop_locked]
[Eliad - adjust to new event waiting api]
Eliad Peller [Thu, 22 Nov 2012 16:06:21 +0000 (18:06 +0200)]
wlcore: save session_id per-link
A new session_id is generated on link allocation.
it is saved in a global array and used later, on tx.
The new fw api adds new bcast/global_session_id
fields to start_role(ap) command, and a new session_id
field to add_peer command. align the driver with it.
Eliad Peller [Thu, 22 Nov 2012 16:06:20 +0000 (18:06 +0200)]
wlcore: pass wmm configuration to the fw
New fields were added to start_role(ap) and
set_peer_state commands, so the fw will be
able to know whether the sta/ap supports
wmm (the fw uses it in order to choose the
AC for some of its internally-generated frames)
For sta, take this value right from bss_conf->qos.
For ap, check for wmm support by looking for the
WMM IE in the configured beacon.
Eliad Peller [Thu, 22 Nov 2012 16:06:19 +0000 (18:06 +0200)]
wlcore: update events enum/struct to new fw api
The event mailbox in wl18xx has a different
(non-compatible) structure.
Create common functions in wlcore to handle the
events, and call them from the chip-specific
event mailbox parsers.
This way, each driver (wl12xx/wl18xx) extracts
the event mailbox by itself according to its
own structure, and then calls the common
wlcore functions to handle it.
Some fields were added to the channel_switch and
stop_channel_switch commands. Unfortunately,
the new 18xx channel_switch struct is not backward
compatible with the 12xx channel switch struct.
Add a new channel_switch op to wlcore, and update
the driver accordingly.