Commit graph

18690 commits

Author SHA1 Message Date
Sujith Manoharan 0f978bfaf2 ath9k: Use a separate TX gain table for WZR-HP-G450H
The Buffalo device WZR-HP-G450H uses the index 3 for TX gain,
which is set to the high_power table currently. Later variants
of the router use the same index, but instead refer to the
low_ob_db gain table. This is not handled in the driver since
there is no way to distinguish board revisions and the high_power
table is used (incorrectly) for the newer variants.

By default, devices based on AR9300 using the TX gain index 3 have
to use the high_power table. To make sure that WZR-HP-G450H is not
broken when the high_power table is updated, use a separate array
based on information obtained from the platform data.

The current situation where only the original variant of WZR-HP-G450H
works properly stays unchanged.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:37:58 -05:00
Sujith Manoharan 492f478d89 ath9k: Update AR9331 v1.2 initvals
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:37:58 -05:00
Sujith Manoharan 367ba05f3e ath9k: Update AR9331 v1.1 initvals
* Update radio/baseband/gain tables.
* Mark ar9331_modes_high_power_tx_gain_1p1 as a duplicate
* ar9331_1p1_mac_postamble is not a duplicate.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:37:57 -05:00
Sujith Manoharan 11295126e3 ath9k: Remove AR955x INI duplicates
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:37:57 -05:00
Sujith Manoharan bc73902a03 ath9k: Update mac_postamble for AR9003 family
Enable the ALWAYS_KEYSEARCH bit in the initvals. Currently
this is done in the driver, but adding this to the initvals
makes it easier to be in sync with the INI files given
by the systems engineering team.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:37:56 -05:00
Sujith Manoharan 4a878b9f89 ath9k: Initialize baseband for DFS channels
Certain baseband registers require different values
to be programmed when operating in a DFS channel to
ensure that radar detection works correctly. This
is required for AR9300, AR9340 and AR9580.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:37:56 -05:00
Sujith Manoharan 98b2e1fdf1 ath9k: Add initval arrays for DFS channels
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:37:56 -05:00
Larry Finger 7f3dbb5636 rtlwifi: rtl8192c-common: Fix sparse warning
Sparse reports the following:

  CHECK   drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:570:34: warning: dubious: !x & y

There should be a parens around the expression.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:37:55 -05:00
Chun-Yeow Yeoh fa643ae2ce wcn36xx: enable the beaconing in mesh mode
Enable the beaconing in wnc36xx by tweaking the tim offset and
force the use of AP-style beaconing. Otherwise, beaconing is not
working. The tim offset is set to 256. Otherwise, this will
overwrite mesh beacon submitted by mac80211.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:37:55 -05:00
Chun-Yeow Yeoh 997b179ba3 ath9k: enable dfs for mesh mode
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:37:54 -05:00
Ujjal Roy bd2a864a14 mwifiex: do not flood kmsg/dmesg with USB debug messages
When TX data URB reaches high water mark the message
"data: -ENOSR is returned" is printed.
This is not an error case, so change it to debug print.

Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:37:54 -05:00
Amitkumar Karwar c2868adebd mwifiex: remove redundant goto exit_remove statement
The check for 'priv' pointer is redundant. 'priv' won't
be used later in this routine.

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>
2013-12-09 15:35:31 -05:00
Ujjal Roy f7b598532f mwifiex: update statistics for bridged packets on AP interface
The bridged packets are updated to statistics on both TX and RX
paths. Also fix a typo in the comment.

Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:35:30 -05:00
Ujjal Roy a1ed484960 mwifiex: correct TX byte count statistics
The skb is modified in sending the TX packet. Save the original
packet length to a variable so that we can get the correct
statistics update.

Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:35:30 -05:00
Ujjal Roy f49c6e8142 mwifiex: correct RX byte count statistics
The skb is modified in processing the RX packet. Save the original
packet length to a variable so that we can get the correct
statistics update.

Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:35:29 -05:00
Ujjal Roy ca8d6dfc92 mwifiex: fix rx_pending count imbalance
RX packets are handled in different paths. Not all paths have
decrement of rx_pending counter. This patch fixes the counter
imbalance.

Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:35:29 -05:00
Bing Zhao f8eb5ee5f5 mwifiex: avoid using variable name eth_hdr
eth_hdr is defined in kernel. Use a different variable name in
our functions.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:35:29 -05:00
Amitkumar Karwar c613d16fa7 mwifiex: fix an issue with Appletalk devices
SNAP/LLC header in the AARP packet is being stripped off while
preparing an EthernetII header.
Annex M, Table M.3 in 802.11 spec says that some header
(ex. AppleTalk AARP(2)) should pass through untouched.
This patch modifies the check to exclude/include EthernetII
header translation for special cases.

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>
2013-12-09 15:35:28 -05:00
Amitkumar Karwar 1bf947a791 mwifiex: remove rfc1042_eth_hdr variable
Use 'rfc1042_header' available in net/wireless/util.c

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>
2013-12-09 15:35:28 -05:00
Amitkumar Karwar a6efc5b7f8 mwifiex: declare snap_type as __be16 variable
Actually we are updating snap_type with h_proto (__be16 variable)
in ethernet frame header. Hence endianness conversion is not
required.

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>
2013-12-09 15:35:27 -05:00
Ujjal Roy 4348d085b8 mwifiex: use little-endian variables in firmware structures
The firmware expects the command structure members in little
endianness.

Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-09 15:35:27 -05:00
John W. Linville 145babc68e Merge tag 'for-linville-20131203' of git://github.com/kvalo/ath
Conflicts:
	drivers/net/wireless/ath/ath10k/htc.c
	drivers/net/wireless/ath/ath10k/mac.c
2013-12-09 15:30:27 -05:00
John W. Linville e08fd975bf Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts:
	drivers/net/wireless/brcm80211/Kconfig
	net/mac80211/util.c
2013-12-06 09:50:45 -05:00
Luis R. Rodriguez 251c9ba191 ath: fix dynamic user regulatory domain support
As it stands dynamic user regulatory domain support is
only possible for a few programmed regulatory domains as
a few countries do not allow for this.

The existing code however only would take advantage of
the feature if a custom world regulatory domain is used
though as that's when we clear beconing flags. We need
to lift this restriction as otherwise this feature is
pointless.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 15:45:51 -05:00
Luis R. Rodriguez ba94c049e5 ath: dynamic user allow check helper to the top
This will be used later.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 15:45:37 -05:00
Luis R. Rodriguez a44ea6ffbb ath: move dynamic_country_user_possible() to the top
This will be used later.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 15:45:24 -05:00
Luis R. Rodriguez 62452a99d0 ath: fix usage of freq_reg_info()
freq_reg_info() expects KHz and not MHz, fix this. In
this case we'll now be getting the no-ir flags cleared
on channels for any channel when the country IE trusts
that channel.

@@
struct ieee80211_channel *ch;
struct wiphy *wiphy;
const struct ieee80211_reg_rule *rule;
@@

-rule = freq_reg_info(wiphy, ch->center_freq);
+rule = freq_reg_info(wiphy, MHZ_TO_KHZ(ch->center_freq));

Generated-by: Coccinelle SmPL
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Peter Senna Tschudin <peter.senna@gmail.com>
Reported-by: Mihir Shete <smihir@qti.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 15:44:59 -05:00
Luis R. Rodriguez 07782d94d9 ath: move the channel for ath_reg_apply_beaconing_flags() into helper
While at it convert this into a switch statement, this
makes it easier and manage.

Cc: smihir@qti.qualcomm.com
Cc: tushnimb@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 15:44:54 -05:00
Luis R. Rodriguez 6c3af5888e ath: simplify ath_reg_apply_beaconing_flags()
Simplify ath_reg_apply_beaconing_flags() by making use of
thew new no-ir helper.

Cc: smihir@qti.qualcomm.com
Cc: tushnimb@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 15:42:21 -05:00
Luis R. Rodriguez f33cbc4f43 ath: rename ath_reg_apply_active_scan_flags() to ath_reg_apply_ir_flags()
This also applies the no-ibss flag to the channels or clears it.
The idea here is to clarify no initiated radiation should be
allowed on these channels.

Cc: smihir@qti.qualcomm.com
Cc: tushnimb@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 15:42:16 -05:00
Luis R. Rodriguez bc0aa06918 ath: clean up ath_reg_apply_active_scan_flags()
The routine ath_reg_apply_active_scan_flags() can be a bit
hard to read, this cleans it up by adding helpers for the
two cases of clearing IR flags or adding them. This approach
also makes no assumptions on the index of channels 12 and 13
so it should be portable accross different drivers.

Cc: smihir@qti.qualcomm.com
Cc: tushnimb@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 15:40:10 -05:00
Luis R. Rodriguez d44040de6a ath: fix logic on ath_reg_apply_active_scan_flags()
The existing logic removes the passive scan flag from
channels 12 and 13 when a regulatory hint coming from
something other than a country IE has been passed. This
is incorrect, the original intention was to ensure we
always have passive scan enabled for these two channels
for a specific set of custom world regulatory domains.

Cc: smihir@qti.qualcomm.com
Cc: tushnimb@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 15:09:56 -05:00
Chun-Yeow Yeoh cddc604639 wcn36xx: fix typo error
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:56:42 -05:00
Larry Finger f699273d6a rtlwifi: rtl8188ee: Fix typo in code
The static analyser "cppcheck" shows the following typo:
drivers/net/wireless/rtlwifi/rtl8188ee/dm.c:1081]: (style) Same expression on both sides of '!='.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: David Binderman <dcb314@hotmail.com>
Cc: David Binderman <dcb314@hotmail.com>
Cc: Stable <stable@vger.kernel.org> [3.10+]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:56:40 -05:00
Jingoo Han 85f66a0e9b wireless: libertas: remove unnecessary spi_set_drvdata()
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:56:37 -05:00
Jingoo Han 515adc14cb wireless: rt2x00: remove unnecessary pci_set_drvdata()
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:56:35 -05:00
Jingoo Han c44354d232 wireless: prism54: remove unnecessary pci_set_drvdata()
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:56:33 -05:00
Jingoo Han 8e27f360c5 wireless: ipw2100: remove unnecessary pci_set_drvdata()
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:56:31 -05:00
Hauke Mehrtens cb500a7c29 brcmsmac: remove dependency on CRC8 and CRC_CCITT
There is no code in brcmsmac that uses a function from CRC8 or
CRC_CCITT any more. Building brcmsmac with these two disabled works
without any problems. This was probably only used by the bus code which
was replaced by bcma some time ago.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:56:29 -05:00
Lorenzo Bianconi fc70ff7207 ath9k: fix retry chain initialization in tx99 code
Initialize first chain attempt counter to 1 in ath9k_build_tx99_skb().
Otherwise multi-retry chain is initialized to {idx,count} = {-1, 0} in
rate_control_fill_sta_table() and tx99 transmission rate is not configured in
rate_control_apply_mask() since first chain idx is set to -1

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:56:28 -05:00
Chun-Yeow Yeoh 42bc702e76 wcn36xx: set self STA default HT parameters
These default HT parameters are required for self STA entry.
In example, set the HT capable of self STA entry for bss
configuration in mesh allows the MCS rate to be used. Otherwise,
only legacy rate will be used.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:56:26 -05:00
Alexey Khoroshilov eddc633a3a libertas sdio: claim device before calling sdio_disable_func()
There is a failure path in if_sdio_power_on(), where
sdio_disable_func() is called without claiming the device.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:56:24 -05:00
Mark Cave-Ayland 18a7424f8c rtlwifi: rtl8192cu: Update table.c
The latest vendor driver has some new values.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:56:22 -05:00
Mark Cave-Ayland 8a7192080f rtlwifi: rtl8192cu: Bring rtl92cu_phy_bb_config() up to date
The latest vendor driver contains some changes not in the kernel version.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:56:21 -05:00
Mark Cave-Ayland d3af1ce138 rtlwifi: Bring _rtl92c_phy_iq_calibrate() in line with the vendor driver
Bring _rtl92c_phy_iq_calibrate() in line with the vendor driver function _PHY_IQCalibrate().

Also fix incorrect initialisation for rtl8192cu.

Signed-of-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:55:24 -05:00
Larry Finger 796e453436 rtlwifi: rtl8192c: Update dynamic gain calculations
The vendor driver contained a number of improvements in the gain settings
for the rtl8192c{e,u} devices. This patch implements them in the kernel
driver.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:55:21 -05:00
Larry Finger d82403a9f4 rtlwifi: Add missing code to PWDB statics routine
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:55:20 -05:00
Larry Finger e9b0784bb9 rtlwifi: rtl8192cu: Fix some code in RF handling
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:55:18 -05:00
Larry Finger 9806eacf5d rtlwifi: rtl8192cu: Update the power index registers
This patch uses the newly introduced power index register routines.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:55:16 -05:00
Larry Finger 97204e93f0 rtlwifi: rtl8192c: Add routines to save/restore power index registers
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-12-05 14:55:14 -05:00