cascardo/linux.git
10 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Fri, 14 Jun 2013 17:18:24 +0000 (13:18 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

10 years agoMerge branch 'for-linville-ath10k' of git://github.com/kvalo/ath6kl
John W. Linville [Thu, 13 Jun 2013 17:34:29 +0000 (13:34 -0400)]
Merge branch 'for-linville-ath10k' of git://github.com/kvalo/ath6kl

10 years agoMerge branch 'for-linville' of git://github.com/kvalo/ath6kl
John W. Linville [Thu, 13 Jun 2013 17:33:39 +0000 (13:33 -0400)]
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl

10 years agoath9k: Fix ANI trigger threshold
Sujith Manoharan [Thu, 13 Jun 2013 03:22:09 +0000 (08:52 +0530)]
ath9k: Fix ANI trigger threshold

Since raising/lowering the limits based on INI has
been changed, the error limit for OFDM has to be 1000,
not 3500.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agocarl9170: add support for the new rate control API
Christian Lamparter [Wed, 12 Jun 2013 19:35:39 +0000 (21:35 +0200)]
carl9170: add support for the new rate control API

With the new rate control API, the driver can now apply the
tx rate to outgoing frames just before they are uploaded to
the device. This is important because the rate control can
now react to fading or improving links a bit sooner.

Also, the driver no longer needs to sort the outgoing frames
for sample attempts (which affected the size of A-MPDUs and
the throughput of the link). For aggregated data frames, the
driver (and rate control) needs only to calculate and apply
a single set of tx rates to every subframe of the whole
aggregate.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoBluetooth: btmrvl: fix error return code in btmrvl_sdio_card_to_host()
Wei Yongjun [Wed, 5 Jun 2013 02:16:55 +0000 (10:16 +0800)]
Bluetooth: btmrvl: fix error return code in btmrvl_sdio_card_to_host()

Fix to return -ENOMEM in the skb alloc error handling case
instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoBluetooth: Add support for Mediatek Bluetooth device [0e8d:763f]
Cho, Yu-Chen [Tue, 4 Jun 2013 13:40:26 +0000 (21:40 +0800)]
Bluetooth: Add support for Mediatek Bluetooth device [0e8d:763f]

This patch adds support for Mediatek Bluetooth device

T:  Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
D:  Ver= 2.01 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0e8d ProdID=763f Rev= 1.00
S:  Manufacturer=MediaTek
S:  Product=BT
S:  SerialNumber=1.0
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=450mA
A:  FirstIf#= 0 IfCount= 2 Cls=ff(vend.) Sub=ff Prot=ff
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=125us
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
I:  If#= 1 Alt= 6 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=03(O) Atr=01(Isoc) MxPS=  63 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  63 Ivl=1ms

Signed-off-by: Cho, Yu-Chen <acho@suse.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoiwlwifi: mvm: remove obsolete comment
Emmanuel Grumbach [Thu, 13 Jun 2013 07:25:43 +0000 (10:25 +0300)]
iwlwifi: mvm: remove obsolete comment

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoiwlwifi: mvm: take the seqno from packet if transmit failed
Emmanuel Grumbach [Thu, 13 Jun 2013 07:07:47 +0000 (10:07 +0300)]
iwlwifi: mvm: take the seqno from packet if transmit failed

The fw is unreliable in all the cases in which the packet
wasn't sent.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoiwlwifi: create opmode/device dependencies
Johannes Berg [Mon, 10 Jun 2013 14:12:52 +0000 (16:12 +0200)]
iwlwifi: create opmode/device dependencies

The older devices (pre-7000/3000 series) all only work with the
DVM opmode due to firmware availability, while newer ones will
only work with the MVM opmode for the same reason.

When building a driver that only has one of MVM or DVM, there's
no reason to build the device support and have the PCIe IDs for
all devices since they can't be used anyway, so avoid that.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoiwlwifi: mvm: mark scratch area in TX command
Johannes Berg [Mon, 10 Jun 2013 13:58:13 +0000 (15:58 +0200)]
iwlwifi: mvm: mark scratch area in TX command

Give the scratch area a sub structure so it's marked
explicitly and it is obvious which part it is.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoiwlwifi: reduce debug ifdefs using the optimiser
Johannes Berg [Wed, 12 Jun 2013 07:56:51 +0000 (09:56 +0200)]
iwlwifi: reduce debug ifdefs using the optimiser

Instead of using #ifdef CONFIG_IWLWIFI_DEBUG, remove the
iwlwifi_mod_params.debug_level variable completely and
make iwl_have_debug_level() always return false in the
non-debug case. This way, the optimiser will elide all
code for it automatically without having to add #ifdefs.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoiwlwifi: remove calib channel section from PHY DB
David Spinadel [Wed, 12 Jun 2013 13:58:04 +0000 (16:58 +0300)]
iwlwifi: remove calib channel section from PHY DB

Remove calibration per-channel data as it's no longer used.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoiwlwifi: mvm: removed an unused parameter from a function
Oren Givon [Wed, 12 Jun 2013 17:37:03 +0000 (20:37 +0300)]
iwlwifi: mvm: removed an unused parameter from a function

Remove the unused iwl_mvm *mvm parameter from the
iwl_mvm_send_remote_wake_cfg function in D3.c.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoiwlwifi: pcie: don't read INTA register in ICT IRQ handler
Johannes Berg [Tue, 11 Jun 2013 19:12:29 +0000 (21:12 +0200)]
iwlwifi: pcie: don't read INTA register in ICT IRQ handler

There's no reason to read the INTA register in the ICT IRQ
handler, this interrupt mechanism is designed to not have
to read as many registers as the regular one. Not reading
the INTA register gives a significant performance/CPU use
improvement.

Since we still want to get this info, fetch it only if
the ISR debug level is enabled.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoiwlwifi: make TX seqno validation more efficient
Johannes Berg [Tue, 11 Jun 2013 17:05:27 +0000 (19:05 +0200)]
iwlwifi: make TX seqno validation more efficient

Accessing the device in Tx path is not a good idea.
Mirror the data in DRAM.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac802...
John W. Linville [Wed, 12 Jun 2013 19:39:05 +0000 (15:39 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211-next

Conflicts:
drivers/net/wireless/iwlwifi/mvm/mac80211.c

10 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Wed, 12 Jun 2013 19:12:41 +0000 (15:12 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

10 years agobrcmfmac: add debugfs statistics for firmware-signalling
Arend van Spriel [Thu, 6 Jun 2013 11:18:07 +0000 (13:18 +0200)]
brcmfmac: add debugfs statistics for firmware-signalling

Added statistics for flow-control and packets dropped by the
driver.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: Always use fifo_credits, also for requested credits.
Hante Meuleman [Thu, 6 Jun 2013 11:18:03 +0000 (13:18 +0200)]
brcmfmac: Always use fifo_credits, also for requested credits.

Currently firmware requested credits do not require fifo credits.
From a buffer management point of view this is incorrect. So
firwmware requested credits require also fifo credits before the
packet can be transferred to the host.

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>
10 years agoRevert "iwl4965: workaround connection regression on passive channel"
Stanislaw Gruszka [Wed, 12 Jun 2013 14:48:25 +0000 (16:48 +0200)]
Revert "iwl4965: workaround connection regression on passive channel"

This reverts commit dd9c46408fdc07098333655ff27edf8cac8d9fcf.

With "iwl{4965,3495): workaround for firmware frame tx rejection"
patches we can enable IEEE80211_HW_REPORTS_TX_ACK_STATUS again.

Tested-by: Jake Edge <jake@lwn.net>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoiwl3945: workaround for firmware frame tx rejection
Stanislaw Gruszka [Wed, 12 Jun 2013 14:44:50 +0000 (16:44 +0200)]
iwl3945: workaround for firmware frame tx rejection

Firmware can reject to transmit frame on passive channel, when it
did not yet received any frame with valid CRC on that channel.
Workaround this problem in the driver.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoiwl4965: workaround for firmware frame tx rejection
Stanislaw Gruszka [Wed, 12 Jun 2013 14:44:49 +0000 (16:44 +0200)]
iwl4965: workaround for firmware frame tx rejection

Firmware can reject to transmit frame on passive channel, when it
did not yet received any frame with valid CRC on that channel.
Workaround this problem in the driver.

Tested-by: Jake Edge <jake@lwn.net>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoiwlegacy: add il_{stop,wake}_queues_by_reason functions
Stanislaw Gruszka [Wed, 12 Jun 2013 14:44:48 +0000 (16:44 +0200)]
iwlegacy: add il_{stop,wake}_queues_by_reason functions

Add functions that will stop/wake all queues. Make them safe
regarding multiple calls and when some ac are stopped/woke
independently.

Tested-by: Jake Edge <jake@lwn.net>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoiwlegacy: small refactoring of il_{stop,wake}_queue
Stanislaw Gruszka [Wed, 12 Jun 2013 14:44:47 +0000 (16:44 +0200)]
iwlegacy: small refactoring of il_{stop,wake}_queue

Tested-by: Jake Edge <jake@lwn.net>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath5k: make use of the new rate control API
Thomas Huehn [Tue, 11 Jun 2013 13:10:31 +0000 (15:10 +0200)]
ath5k: make use of the new rate control API

This patch enabels ath5k to use the new rate table to lookup each
mrr rate and retry information per packet.

Signed-off-by: Benjamin Vahl <bvahl@net.t-labs.tu-berlin.de>
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Do not assign noise for NULL caldata
Sujith Manoharan [Mon, 10 Jun 2013 08:19:40 +0000 (13:49 +0530)]
ath9k: Do not assign noise for NULL caldata

ah->noise is maintained globally and not per-channel. This
is updated in the reset() routine after the NF history has been
filled for the *current channel*, just before switching to
the new channel. There is no need to do it inside getnf(), since
ah->noise must contain a value for the new channel.

Cc: stable@vger.kernel.org
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix noisefloor calibration
Sujith Manoharan [Mon, 10 Jun 2013 08:19:39 +0000 (13:49 +0530)]
ath9k: Fix noisefloor calibration

The commits,

"ath9k: Fix regression in channelwidth switch at the same channel"
"ath9k: Fix invalid noisefloor reading due to channel update"

attempted to fix noisefloor calibration when a channel switch
happens due to HT20/HT40 bandwidth change. This is causing invalid
readings resulting in messages like:

"ath: phy16: NF[0] (-45) > MAX (-95), correcting to MAX".

This results in an incorrect noise being used initially for reporting
the signal level of received packets, until NF calibration is done
and the history buffer is updated via the ANI timer, which happens
much later.

When a bandwidth change happens, it is appropriate to reset
the internal history data for the channel. Do this correctly in the
reset() routine by checking the "chanmode" variable.

Cc: stable@vger.kernel.org
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_hw: Assign default xlna config for AR9485
Sujith Manoharan [Mon, 10 Jun 2013 08:19:38 +0000 (13:49 +0530)]
ath9k_hw: Assign default xlna config for AR9485

For AR9485 boards with XLNA, the default gpio config
is not set correctly, fix this.

Cc: stable@vger.kernel.org
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: activate N-PHY and HT-PHY support by default
Hauke Mehrtens [Sun, 9 Jun 2013 16:59:43 +0000 (18:59 +0200)]
b43: activate N-PHY and HT-PHY support by default

N-PHY and HT-PHY support is more or less stable and should be activated
by default.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobcma: activate PCI host option by default
Hauke Mehrtens [Sun, 9 Jun 2013 16:59:42 +0000 (18:59 +0200)]
bcma: activate PCI host option by default

Most users are using bcma with a PCIe card, activate support for
this by default.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: ensue that BCMA is "y" when B43 is "y"
Hauke Mehrtens [Sun, 9 Jun 2013 16:53:58 +0000 (18:53 +0200)]
b43: ensue that BCMA is "y" when B43 is "y"

When b43 gets build into the kernel and it should use bcma we have to
ensure that bcma was also build into the kernel and not as a module.
In this patch this is also done for SSB, although you can not
build b43 without ssb support for now.

This fixes a build problem reported by Randy Dunlap in
5187EB95.2060605@infradead.org

Reported-By: Randy Dunlap <rdunlap@infradead.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: add STBC TX support
Oleksij Rempel [Sun, 9 Jun 2013 16:51:24 +0000 (18:51 +0200)]
ath9k_htc: add STBC TX support

All known ar7010+ar* device and current FW support STBC TX. This patch
make use of it and suggest to send STBC if peer support it.
I use wort "suggest" since currenly we have separate rate controller
in FW which will make decision based on rate and hardware.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: Fix AP/PCP start flow
Kirshenbaum Erez [Sun, 9 Jun 2013 14:35:28 +0000 (17:35 +0300)]
wil6210: Fix AP/PCP start flow

WMI PCP Start flow should not be handled through:
net_device_ops->ndo_open()->wil_up()->__wil_up()
because it missing mandatory FW parameters (SSID,Channel,IEs, Security...).

Prior to AP starting __wil_up() may be called with iftype set
cfg80211_ops->change_virtual_intf(NL80211_IFTYPE_AP or STATION)
depend on the application hostapd/wpa_supplicant/iw.
there should not be an attempt to start an AP flow,
AP/PCP start flow will be started latter by cfg80211_ops->start_ap().

Signed-off-by: Kirshenbaum Erez <erezk@wilocity.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fix name of tracing config option
Hauke Mehrtens [Sun, 9 Jun 2013 11:10:05 +0000 (13:10 +0200)]
wil6210: fix name of tracing config option

Tracing in wil6210 is activated with WIL6210_TRACING and not with
ATH6KL_TRACING, this is used for the ath6kl driver. Rename the config
option.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: Init Rx vring right after reset
Vladimir Kondratiev [Sun, 9 Jun 2013 06:12:55 +0000 (09:12 +0300)]
wil6210: Init Rx vring right after reset

at the vring initialisation, memory pool get allocated in the FW.
Make it 1-st because FW need this memory pool to precess
next commands

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: Send EAPOL frames using normal Tx queue
Vladimir Kondratiev [Sun, 9 Jun 2013 06:12:54 +0000 (09:12 +0300)]
wil6210: Send EAPOL frames using normal Tx queue

No more need for special processing of EAPOL, FW can now send EAPOL frames
using normal Tx queue for TID 0

This fixes "schedule while atomic" bug - start_xmit called in softirq context;
while WMI mechanism that was used may sleep.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: Derive IE's for AP
Vladimir Kondratiev [Sun, 9 Jun 2013 06:12:53 +0000 (09:12 +0300)]
wil6210: Derive IE's for AP

When starting secure AP, in some cases wpa_s provides probe template but not
probe/assoc IE's. In this case, derive missing IE's from probe.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: improve frame type reporting
Vladimir Kondratiev [Sun, 9 Jun 2013 06:12:52 +0000 (09:12 +0300)]
wil6210: improve frame type reporting

Report FC from the frame itself, as auxiliary information includes
only frame subtype. This is preparation for future changes, when
DMG beacon (extension frame) may be reported through wmi_evt_rx_mgmt()

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: map more FW memory
Vladimir Kondratiev [Sun, 9 Jun 2013 06:12:51 +0000 (09:12 +0300)]
wil6210: map more FW memory

map card's back-door debug data

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fix timeout for start_pcp
Vladimir Kondratiev [Sun, 9 Jun 2013 06:12:50 +0000 (09:12 +0300)]
wil6210: fix timeout for start_pcp

It may take up to 3500ms for the FW to start AP/PCP. Increase accordingly,
adding some safety margin.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: limit multicast buffer hardware queue depth
Felix Fietkau [Fri, 7 Jun 2013 16:12:02 +0000 (18:12 +0200)]
ath9k: limit multicast buffer hardware queue depth

The CAB (Content after Beacon) queue is used for beacon-triggered
transmission of buffered multicast frames. If lots of multicast frames
were buffered and this queue fills up, it drowns out all regular
traffic. To limit the damage that buffered traffic can do, try to limit
the queued data to becaon_interval / 8.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: implement support for .release_buffered_frames()
Felix Fietkau [Fri, 7 Jun 2013 16:12:01 +0000 (18:12 +0200)]
ath9k: implement support for .release_buffered_frames()

This adds support for PS-Poll and U-APSD driver-buffered frames (part of
an aggregation session).

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: add support for IEEE80211_TX_CTL_PS_RESPONSE
Felix Fietkau [Fri, 7 Jun 2013 16:12:00 +0000 (18:12 +0200)]
ath9k: add support for IEEE80211_TX_CTL_PS_RESPONSE

Use the UAPSD hardware queue to get PS-Poll responses out as fast as
possible and without backoff.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: free primary net_device when brcmf_bus_start() fails
Arend van Spriel [Fri, 7 Jun 2013 09:03:00 +0000 (11:03 +0200)]
brcmfmac: free primary net_device when brcmf_bus_start() fails

When initialization within brcmf_bus_start() fails on steps
before the brcmf_net_attach() the net_device for the primary
interface needs to be freed.

This patch resolves a panic during kernel boot as reported
by Stephen Warren.

ref.: http://mid.gmane.org/51AD1F22.2080004@wwwdotorg.org

Tested-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: Sent TIM information in case of data available.
Arend van Spriel [Thu, 6 Jun 2013 11:49:32 +0000 (13:49 +0200)]
brcmfmac: Sent TIM information in case of data available.

When data is available and fw signalling is enabled then TIM
information should be sent to firmware. If it can piggy back
on existing packet then do that otherwise create dummy packet
to get information out.

Cc: Dan Carpenter <dan.carpenter@oracle.com>
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>
10 years agobrcmfmac: increment hard_header_len instead of overriding
Arend van Spriel [Thu, 6 Jun 2013 11:18:06 +0000 (13:18 +0200)]
brcmfmac: increment hard_header_len instead of overriding

In brcmf_net_attach() the hard_header_len is set to sum of ETH_HLEN
and the headroom needed by the bus interface. Better use increment
instead as hard_header_len is already initialized upon alloc_netdev().

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: add trace event for capturing BDC header
Arend van Spriel [Thu, 6 Jun 2013 11:18:05 +0000 (13:18 +0200)]
brcmfmac: add trace event for capturing BDC header

The BDC header contains PropTx TLV signals that are useful to capture
for debugging. This event captures the header and tlv's in binary
form. This can be post-processed using trace-cmd plugin.

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>
10 years agobrcmfmac: fix send_pkts statistic counter in firmware-signalling
Arend van Spriel [Thu, 6 Jun 2013 11:18:02 +0000 (13:18 +0200)]
brcmfmac: fix send_pkts statistic counter in firmware-signalling

The statistic counter send_pkts was wrongly counted conditionally.
Correcting the mistake.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: Simplify counting transit count.
Hante Meuleman [Thu, 6 Jun 2013 11:18:01 +0000 (13:18 +0200)]
brcmfmac: Simplify counting transit count.

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>
10 years agobrcmfmac: Fix endless loop when brcmf_fws_commit_skb fails.
Hante Meuleman [Thu, 6 Jun 2013 11:18:00 +0000 (13:18 +0200)]
brcmfmac: Fix endless loop when brcmf_fws_commit_skb fails.

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>
10 years agobrcmfmac: Signalling header push and pull on logic places.
Hante Meuleman [Thu, 6 Jun 2013 11:17:59 +0000 (13:17 +0200)]
brcmfmac: Signalling header push and pull on logic places.

Currently suppressed packets get enque-ed with header which
then gets pulled before transmit. It is more logical and clean
to pull the header on return and push it unconditionally on xmit.

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>
10 years agobrcmfmac: Accept only first creditmap event.
Hante Meuleman [Thu, 6 Jun 2013 11:17:58 +0000 (13:17 +0200)]
brcmfmac: Accept only first creditmap event.

During P2P testing it turned out that the firmware sents multiple
multiple creditmap event messages. Only the first message from the
firmware should be processed. Otherwise the firmware-signalled flow
control can run haywire when it has packets outstanding in firmware.

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>
10 years agobrcmfmac: fix invalid ifp lookup in firmware-signalling
Hante Meuleman [Thu, 6 Jun 2013 11:17:57 +0000 (13:17 +0200)]
brcmfmac: fix invalid ifp lookup in firmware-signalling

The destination entries for firmware-signalled flow control have
the interface id stored. This needs to be translated to bsscfg
index when looking up the ifp object for the interface.

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>
10 years agobrcmfmac: Find correct MAC descriptor in case of TDLS.
Hante Meuleman [Thu, 6 Jun 2013 11:17:56 +0000 (13:17 +0200)]
brcmfmac: Find correct MAC descriptor in case of TDLS.

In case of TDLS find the correct MAC descriptor for fw signalling
data. In case of TDLS each destination gets its own entry. This
was not handled correctly for P2P client.

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>
10 years agobrcmfmac: Correct creditmap when credit borrowing is active.
Hante Meuleman [Thu, 6 Jun 2013 11:17:54 +0000 (13:17 +0200)]
brcmfmac: Correct creditmap when credit borrowing is active.

When credit borrowing is active the BE credits have been depleted,
however the worker should still be scheduled. In case of credit
borrowing correct credit map to make sure worker remains active.

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>
10 years agobrcmfmac: For FW signalling it is necessary to track gen bit.
Hante Meuleman [Thu, 6 Jun 2013 11:17:53 +0000 (13:17 +0200)]
brcmfmac: For FW signalling it is necessary to track gen bit.

Store gen bit on suppressed packet per entry and use latest
stored version for each packet which gets transmitted to fw.

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>
10 years agobrcmfmac: On bus flow control use fw signalling or netif.
Hante Meuleman [Thu, 6 Jun 2013 11:17:52 +0000 (13:17 +0200)]
brcmfmac: On bus flow control use fw signalling or netif.

Currently on a bus flow control both fws is informed and netif queue
gets closed. In case of fw signalling enabled, let the flow control
be handled by fw signalling only.

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>
10 years agobrcmfmac: reducing debug logging in firmware-signalling code
Arend van Spriel [Thu, 6 Jun 2013 11:17:51 +0000 (13:17 +0200)]
brcmfmac: reducing debug logging in firmware-signalling code

The debug logging in firmware-signalling code was rather extensive and
for a large part in the data path. This patch removes large part or the
level is changed to DATA level.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: explicitly indicate sk_buff is sent upon request credit
Arend van Spriel [Thu, 6 Jun 2013 11:17:50 +0000 (13:17 +0200)]
brcmfmac: explicitly indicate sk_buff is sent upon request credit

Firmware can request the driver for transmit packets using two different
signals. Only for one signal a flag was set in the sk_buff control
buffer. This patch adds explicit flag for the other signal as well.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: rework credit pickup to assure consistent handling
Arend van Spriel [Thu, 6 Jun 2013 11:17:49 +0000 (13:17 +0200)]
brcmfmac: rework credit pickup to assure consistent handling

Reworked brcmf_skb_pick_up_credit() so it can be used for both
fcmode flavours in the same way.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: Take bus flowcontrol at credit mgmt into account.
Hante Meuleman [Thu, 6 Jun 2013 11:17:48 +0000 (13:17 +0200)]
brcmfmac: Take bus flowcontrol at credit mgmt into account.

On bus flow control (no more host bus resources to send packets
to device) the netif flow control was toggled, however credit
management should also take this status into account. Since there
are multiple sources handling this flow control necessary spinlocks
were added to protect flow control related data/states.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@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>
10 years agobrcmfmac: remove fifo bitfield from brcmf_skbuff_cb::if_flags
Arend van Spriel [Thu, 6 Jun 2013 11:17:47 +0000 (13:17 +0200)]
brcmfmac: remove fifo bitfield from brcmf_skbuff_cb::if_flags

The brcmf_skbuff_cb structure contain if_flags and htod fields. Both
have a bitfield defined to hold the fifo number. With a small code
change we get rid of the fifo bitfield in if_flags.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: allow firmware-signal tlv to be longer than specified
Arend van Spriel [Thu, 6 Jun 2013 11:17:46 +0000 (13:17 +0200)]
brcmfmac: allow firmware-signal tlv to be longer than specified

The firmware-signal API specification defines length for the different
tlv. During testing on different devices it turned out not all firmware
used the tlv length according specification. Therefore the length check
is made less strict with this patch.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: rt2800usb: nuke rt2800usb_ops_5592
Gabor Juhos [Thu, 6 Jun 2013 07:36:20 +0000 (09:36 +0200)]
rt2x00: rt2800usb: nuke rt2800usb_ops_5592

It is exactly the same like the generic rt2800usb_ops.
Remove the duplicate and use the generic ops for all
devices.

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>
10 years agort2x00: move extra_tx_headroom field from rt2x00_ops to rt2x00_dev
Gabor Juhos [Thu, 6 Jun 2013 07:36:19 +0000 (09:36 +0200)]
rt2x00: move extra_tx_headroom field from rt2x00_ops to rt2x00_dev

The extra_tx_headroom field of struct rt2x00_ops
indicates the extra TX headroom size required for
a given device. This data is redundant, the value
can be computed from the desc_size and winfo_size
fields of the TX queues.

Move the extra_tx_headroom field to struct rt2x00_dev,
compute its value in the probe routine and use the
cached value in the rest of the code.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath: add VHT80 support for regulatory domains
Luis R. Rodriguez [Thu, 6 Jun 2013 03:45:36 +0000 (20:45 -0700)]
ath: add VHT80 support for regulatory domains

This adds VHT80 support for the QCA world regulatory
domains.

Cc: kvalo@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoiwlegacy: fix error return code in il3945_pci_probe()
Wei Yongjun [Wed, 5 Jun 2013 02:16:33 +0000 (10:16 +0800)]
iwlegacy: fix error return code in il3945_pci_probe()

Fix to return a negative error code in the il3945_hw_set_hw_params() error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: enable/disable tx_amsdu support via module parameter
Avinash Patil [Tue, 4 Jun 2013 23:20:38 +0000 (16:20 -0700)]
mwifiex: enable/disable tx_amsdu support via module parameter

This patch disables tx_amsdu support in mwifiex by default.
tx_amdsu support can be enabled via module parameter at load time.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: fix regression issue for usb interface
Amitkumar Karwar [Tue, 4 Jun 2013 23:19:56 +0000 (16:19 -0700)]
mwifiex: fix regression issue for usb interface

PATCH "mwifiex: scan delay timer cleanup in unload path" adds code
to cancel scan delay timer in unload path. It causes a regression
for USB interface.

USB8797 card gets enumerated twice. First enumeration is for
firmware download and second enumeration expects firmware
initialization.

It was observed that we are trying del_timer_sync() without setting
up the timer when remove handler is called after first enumeration.

This patch moves setup_timer() call to appropriate place so that
timer is setup for both the enumerations.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: remove data_queue_desc struct
Gabor Juhos [Tue, 4 Jun 2013 11:40:50 +0000 (13:40 +0200)]
rt2x00: remove data_queue_desc struct

If the queue_init callback is implemented
by a driver it gets used instead of the
data_queue_desc based initialization.

The queue_init callback is implemented for
each drivers now, so the old initialization
method is not used anymore. Remove the unused
data_queue_desc structure and all of the
related code.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: rt2500usb: implement queue_init callback
Gabor Juhos [Tue, 4 Jun 2013 11:40:49 +0000 (13:40 +0200)]
rt2x00: rt2500usb: implement queue_init callback

The generic rt2x00 code has been changed to allow the
drivers toimplement dynamic data_queue initialization.

Remove the static data queue descriptor structures
and implement the queue_init callback instead.

Compile tested only.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: rt61pci: implement queue_init callback
Gabor Juhos [Tue, 4 Jun 2013 11:40:48 +0000 (13:40 +0200)]
rt2x00: rt61pci: implement queue_init callback

The generic rt2x00 code has been changed to allow the
drivers toimplement dynamic data_queue initialization.

Remove the static data queue descriptor structures
and implement the queue_init callback instead.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Tested-by: Jakub Kicinski <kubakici@wp.pl>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: rt2500pci: implement queue_init callback
Gabor Juhos [Tue, 4 Jun 2013 11:40:47 +0000 (13:40 +0200)]
rt2x00: rt2500pci: implement queue_init callback

The generic rt2x00 code has been changed to allow the
drivers toimplement dynamic data_queue initialization.

Remove the static data queue descriptor structures
and implement the queue_init callback instead.

Compile tested only.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: rt2400pci: implement queue_init callback
Gabor Juhos [Tue, 4 Jun 2013 11:40:46 +0000 (13:40 +0200)]
rt2x00: rt2400pci: implement queue_init callback

The generic rt2x00 code has been changed to allow the
drivers toimplement dynamic data_queue initialization.

Remove the static data queue descriptor structures
and implement the queue_init callback instead.

Compile tested only.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: rt73usb: implement queue_init callback
Gabor Juhos [Tue, 4 Jun 2013 11:40:45 +0000 (13:40 +0200)]
rt2x00: rt73usb: implement queue_init callback

The generic rt2x00 code has been changed to allow the
drivers toimplement dynamic data_queue initialization.

Remove the static data queue descriptor structures
and implement the queue_init callback instead.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: rt2800pci: implement queue_init callback
Gabor Juhos [Tue, 4 Jun 2013 11:40:44 +0000 (13:40 +0200)]
rt2x00: rt2800pci: implement queue_init callback

The generic rt2x00 code has been changed to allow the
drivers toimplement dynamic data_queue initialization.

Remove the static data queue descriptor structures
and implement the queue_init callback instead.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: rt2800usb: implement queue_init callback
Gabor Juhos [Tue, 4 Jun 2013 11:40:43 +0000 (13:40 +0200)]
rt2x00: rt2800usb: implement queue_init callback

The generic rt2x00 code has been changed to allow the
drivers toimplement dynamic data_queue initialization.

Remove the static data queue descriptor structures
and implement the queue_init callback instead.

The actual chipset is already known when the callback
is used. This allows us to use a single callback for
all supported devices.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: add queue_init callback to rt2x00_ops
Gabor Juhos [Tue, 4 Jun 2013 11:40:42 +0000 (13:40 +0200)]
rt2x00: add queue_init callback to rt2x00_ops

The driver uses static data structures for initializing
specific fields of a given data queue. These static
queue data descriptor structures are containing values
which related to a given chipset.

Even though the values are chip specific, the actual
selection of the used structure is based on device
specific vendor/product identifiers. This approach works,
but it is not always reliable. Sometimes the vendor and/or
device IDs of the PCI and USB devices contains improper
values which makes it impossible to select the correct
structure for such devices.

The patch adds a new callback to tr2x00_ops which
is called after the chipset detection is finished.
This allows the drivers to do dynamic initialization
of the data_queue structure for a given queue based
on the actual chipset.

After each driver implements the queue_init callback,
the data_queue_desc structure will be removed.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: rt2x00queue: setup queue->threshold from queue->limit
Gabor Juhos [Tue, 4 Jun 2013 11:40:41 +0000 (13:40 +0200)]
rt2x00: rt2x00queue: setup queue->threshold from queue->limit

Use the queue->limit value instead of the
qdesc->entry_num to compute the threshold.
The two source values are the same and the
data queue descriptor structure will be
removed by a later patch.

Also separate the computation from the rest
of the init code to make further changes
easier.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: rt2x00dev: use rt2x00dev->bcn->limit
Gabor Juhos [Tue, 4 Jun 2013 11:40:40 +0000 (13:40 +0200)]
rt2x00: rt2x00dev: use rt2x00dev->bcn->limit

The beacon data queue is initialized already,
so fetch the number of the queue entries from
that instead of using the entry_num field of
the data queue descriptor.

The two values are the same, and the use of the
rt2x00dev->bcn->limit value allows us to get rid
of a superfluous pointer dereference.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: rt2x00queue: remove qdesc parameter of rt2x00queue_alloc_entries
Gabor Juhos [Tue, 4 Jun 2013 11:40:39 +0000 (13:40 +0200)]
rt2x00: rt2x00queue: remove qdesc parameter of rt2x00queue_alloc_entries

The qdesc parameter is not used anymore, so remove that.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: rt2x00queue: add priv_size field to struct data_queue
Gabor Juhos [Tue, 4 Jun 2013 11:40:38 +0000 (13:40 +0200)]
rt2x00: rt2x00queue: add priv_size field to struct data_queue

Add a new field into struct data_queue and store
the size of the per-queue_entry private data in
that. Additionally, use the new field in the
rt2x00queue_alloc_entries function to compute
the size of the queue entries for a given queue.

The patch does not change the current behaviour
but makes it possible to remove the queue_desc
parameter of the rt2x00queue_alloc_entries function.
That will be done by a subsequent patch.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Remove unused ANI macros
Sujith Manoharan [Tue, 4 Jun 2013 10:11:35 +0000 (15:41 +0530)]
ath9k: Remove unused ANI macros

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Remove redundant code
Sujith Manoharan [Tue, 4 Jun 2013 10:11:34 +0000 (15:41 +0530)]
ath9k: Remove redundant code

The phy error mask registers are programmed already
in ath9k_ani_restart(), so there is no need to set them
in ath9k_ani_reset().

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix ofdm weak signal configuration
Sujith Manoharan [Tue, 4 Jun 2013 10:11:33 +0000 (15:41 +0530)]
ath9k: Fix ofdm weak signal configuration

The commit, "ath9k_hw: improve ANI processing and rx desensitizing parameters"
removed code setting various phy registers holding threshold values.

This is likely required for OFDM weak signal detection to function
correctly, so add them, but skip AR9462 and AR9565.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix ANI levels
Sujith Manoharan [Tue, 4 Jun 2013 10:11:32 +0000 (15:41 +0530)]
ath9k: Fix ANI levels

The commit, "ath9k_hw: improve ANI processing and rx desensitizing parameters"
modified the immunity level tables for both CCK and OFDM. Fix them
so that the tables are in sync with the internal driver/codebase.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix ANI monitoring
Sujith Manoharan [Tue, 4 Jun 2013 10:11:31 +0000 (15:41 +0530)]
ath9k: Fix ANI monitoring

The commit "ath9k_hw: improve ANI processing and rx desensitizing parameters"
changed various ANI operational parameters to address a specific
card/environment. This is not really applicable for other cards
in general usage.

As per internal documentation, lowering the immunity level can be
done only after 5 periods have passed and the CCK/OFDM errors are
below the low watermak threshold - which have been fixed at 300 and
400 respectively by the sytems team.

Raising the immunity level can be done when CCK/OFDM errors exceed
600 and 1000 (per second).

Set these values once during attach.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix OFDM weak signal detection for AP mode
Sujith Manoharan [Tue, 4 Jun 2013 10:11:30 +0000 (15:41 +0530)]
ath9k: Fix OFDM weak signal detection for AP mode

The commit "ath9k_hw: improve ANI processing and rx desensitizing parameters"
changed the OFDM weak signal detection logic to disable it
for AP mode, which is not allowed. Fix this and enable it always
for AP mode.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Wed, 12 Jun 2013 18:35:23 +0000 (14:35 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless

Conflicts:
drivers/net/wireless/ath/ath9k/Kconfig
net/mac80211/iface.c

10 years agoath10k: mac80211 driver for Qualcomm Atheros 802.11ac CQA98xx devices
Kalle Valo [Wed, 12 Jun 2013 17:52:10 +0000 (20:52 +0300)]
ath10k: mac80211 driver for Qualcomm Atheros 802.11ac CQA98xx devices

Here's a new mac80211 driver for Qualcomm Atheros 802.11ac QCA98xx devices.
A major difference from ath9k is that there's now a firmware and
that's why we had to implement a new driver.

The wiki page for the driver is:

http://wireless.kernel.org/en/users/Drivers/ath10k

The driver has had many authors, they are listed here alphabetically:

Bartosz Markowski <bartosz.markowski@tieto.com>
Janusz Dziedzic <janusz.dziedzic@tieto.com>
Kalle Valo <kvalo@qca.qualcomm.com>
Marek Kwaczynski <marek.kwaczynski@tieto.com>
Marek Puzyniak <marek.puzyniak@tieto.com>
Michal Kazior <michal.kazior@tieto.com>
Sujith Manoharan <c_manoha@qca.qualcomm.com>

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agob43: stop format string leaking into error msgs
Kees Cook [Fri, 10 May 2013 21:48:21 +0000 (14:48 -0700)]
b43: stop format string leaking into error msgs

The module parameter "fwpostfix" is userspace controllable, unfiltered,
and is used to define the firmware filename. b43_do_request_fw() populates
ctx->errors[] on error, containing the firmware filename. b43err()
parses its arguments as a format string. For systems with b43 hardware,
this could lead to a uid-0 to ring-0 escalation.

CVE-2013-2852

Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Use minstrel rate control by default
Sujith Manoharan [Thu, 6 Jun 2013 04:36:29 +0000 (10:06 +0530)]
ath9k: Use minstrel rate control by default

The ath9k rate control algorithm has various architectural
issues that make it a poor fit in scenarios like congested
environments etc.

An example: https://bugzilla.redhat.com/show_bug.cgi?id=927191

Change the default to minstrel which is more robust in such cases.
The ath9k RC code is left in the driver for now, maybe it can
be removed altogether later on.

Cc: stable@vger.kernel.org
Cc: Jouni Malinen <jouni@qca.qualcomm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoRevert "ath9k_hw: Update rx gain initval to improve rx sensitivity"
Felix Fietkau [Mon, 3 Jun 2013 09:18:57 +0000 (11:18 +0200)]
Revert "ath9k_hw: Update rx gain initval to improve rx sensitivity"

This reverts commit 68d9e1fa24d9c7c2e527f49df8d18fb8cf0ec943

This change reduces rx sensitivity with no apparent extra benefit.
It looks like it was meant for testing in a specific scenario,
but it was never properly validated.

Cc: rmanohar@qca.qualcomm.com
Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Disable PowerSave by default
Sujith Manoharan [Sat, 1 Jun 2013 01:38:09 +0000 (07:08 +0530)]
ath9k: Disable PowerSave by default

Almost all the DMA issues which have plagued ath9k (in station mode)
for years are related to PS. Disabling PS usually "fixes" the user's
connection stablility. Reports of DMA problems are still trickling in
and are sitting in the kernel bugzilla. Until the PS code in ath9k is
given a thorough review, disbale it by default. The slight increase
in chip power consumption is a small price to pay for improved link
stability.

Cc: stable@vger.kernel.org
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agonet: wireless: iwlegacy: fix build error for il_pm_ops
Yijing Wang [Fri, 31 May 2013 06:05:32 +0000 (14:05 +0800)]
net: wireless: iwlegacy: fix build error for il_pm_ops

Fix build error for il_pm_ops if CONFIG_PM is set
but CONFIG_PM_SLEEP is not set.

ERROR: "il_pm_ops" [drivers/net/wireless/iwlegacy/iwl4965.ko] undefined!
ERROR: "il_pm_ops" [drivers/net/wireless/iwlegacy/iwl3945.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: netdev@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: Jingoo Han <jg1.han@samsung.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: Fix a false leak indication for PCI devices
Larry Finger [Thu, 30 May 2013 21:21:47 +0000 (16:21 -0500)]
rtlwifi: Fix a false leak indication for PCI devices

This false leak indication is avoided with a no-leak annotation to kmemleak.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowl12xx/wl18xx: scan all 5ghz channels
Eliad Peller [Tue, 7 May 2013 12:41:09 +0000 (15:41 +0300)]
wl12xx/wl18xx: scan all 5ghz channels

Due to a typo, the current code copies only sizeof(cmd->channels_2)
bytes, which is smaller than the correct sizeof(cmd->channels_5)
size, resulting in a partial scan (some channels are skipped).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowl12xx: increase minimum singlerole firmware version required
Luciano Coelho [Fri, 10 May 2013 07:44:25 +0000 (10:44 +0300)]
wl12xx: increase minimum singlerole firmware version required

The minimum firmware version required for singlerole after recent
driver changes is 6/7.3.10.0.133.

Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowl12xx: fix minimum required firmware version for wl127x multirole
Luciano Coelho [Fri, 10 May 2013 07:19:38 +0000 (10:19 +0300)]
wl12xx: fix minimum required firmware version for wl127x multirole

There was a typo in commit 8675f9 (wlcore/wl12xx/wl18xx: verify
multi-role and single-role fw versions), which was causing the
multirole firmware for wl127x (WiLink6) to be rejected.  The actual
minimum version needed for wl127x multirole is 6.5.7.0.42.

Reported-by: Levi Pearson <levipearson@gmail.com>
Reported-by: Michael Scott <hashcode0f@gmail.com>
Cc: stable@kernel.org # 3.9+
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>