platform/kernel/linux-rpi.git
10 years agoNFC: Return driver failure upon unknown event reception
Samuel Ortiz [Wed, 13 Nov 2013 00:00:07 +0000 (01:00 +0100)]
NFC: Return driver failure upon unknown event reception

If the device is polling, this will trigger a netlink event to notify
userspace about the polling error.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: pn544: Refactor hw_config values
Arman Uguray [Fri, 15 Nov 2013 01:07:32 +0000 (17:07 -0800)]
NFC: pn544: Refactor hw_config values

Some of the EEPROM configurations that are assigned by the PN544 driver
are set by the firmware and should not be modified by the driver. Others
are certain user mode configurations that are currently getting set to values
that shouldn't necessarily be dictated by the driver. This patch changes
most user and system mode configurations to the firmware defaults.

Signed-off-by: Arman Uguray <armansito@chromium.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: mei_phy: Using kfree_skb() instead of kfree()
Salil Kapur [Thu, 31 Oct 2013 17:47:46 +0000 (23:17 +0530)]
NFC: mei_phy: Using kfree_skb() instead of kfree()

Using kfree_skb() instead of kfree() for struct sk_buff

Signed-off-by: Salil Kapur <salilkapur93@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agowireless: delete non-required instances of include <linux/init.h>
Paul Gortmaker [Thu, 2 Jan 2014 23:58:32 +0000 (18:58 -0500)]
wireless: delete non-required instances of include <linux/init.h>

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agossb: fix sparse warnings in driver_chipcommon_sflash.c
Hauke Mehrtens [Thu, 2 Jan 2014 18:31:37 +0000 (19:31 +0100)]
ssb: fix sparse warnings in driver_chipcommon_sflash.c

  CHECK   drivers/ssb/driver_chipcommon_sflash.c
drivers/ssb/driver_chipcommon_sflash.c:40:11: warning: Using plain integer as NULL pointer
drivers/ssb/driver_chipcommon_sflash.c:58:11: warning: Using plain integer as NULL pointer
drivers/ssb/driver_chipcommon_sflash.c:69:11: warning: Using plain integer as NULL pointer

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobcma: fix sparse warnings in driver_chipcommon_sflash.c
Hauke Mehrtens [Thu, 2 Jan 2014 18:31:36 +0000 (19:31 +0100)]
bcma: fix sparse warnings in driver_chipcommon_sflash.c

  CHECK   drivers/bcma/driver_chipcommon_sflash.c
drivers/bcma/driver_chipcommon_sflash.c:41:11: warning: Using plain integer as NULL pointer
drivers/bcma/driver_chipcommon_sflash.c:59:11: warning: Using plain integer as NULL pointer
drivers/bcma/driver_chipcommon_sflash.c:70:11: warning: Using plain integer as NULL pointer

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix regulatory compliance
Sujith Manoharan [Thu, 2 Jan 2014 04:36:35 +0000 (10:06 +0530)]
ath9k: Fix regulatory compliance

The maximum permissible values for noise floor in ETSI
and Japan domains have been updated with new EU
regulations for CCA detection. Adjust the values in the
driver accordingly.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix AR955x RX sensitivity
Sujith Manoharan [Thu, 2 Jan 2014 04:36:21 +0000 (10:06 +0530)]
ath9k: Fix AR955x RX sensitivity

AR955x has problems with RX sensitivity in 2G. This patch
adds a routine to select range_osdac dynamically on a
per-chain basis to address this issue.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowireless: cw1200: Fix memory leak in cw1200_wow_suspend()
Christian Engelmayer [Tue, 31 Dec 2013 17:33:57 +0000 (18:33 +0100)]
wireless: cw1200: Fix memory leak in cw1200_wow_suspend()

Fix a memory leak in the cw1200_wow_suspend() error handling path.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Add hardware support for QCA9531
Sujith Manoharan [Tue, 31 Dec 2013 02:42:02 +0000 (08:12 +0530)]
ath9k: Add hardware support for QCA9531

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Initialize QCA953x INI arrays
Sujith Manoharan [Tue, 31 Dec 2013 02:42:01 +0000 (08:12 +0530)]
ath9k: Initialize QCA953x INI arrays

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Add QCA953x initvals
Sujith Manoharan [Tue, 31 Dec 2013 02:42:00 +0000 (08:12 +0530)]
ath9k: Add QCA953x initvals

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Assign macVersion for QCA9531
Sujith Manoharan [Tue, 31 Dec 2013 02:41:59 +0000 (08:11 +0530)]
ath9k: Assign macVersion for QCA9531

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Add version/revision macros for QCA9531
Sujith Manoharan [Tue, 31 Dec 2013 02:41:58 +0000 (08:11 +0530)]
ath9k: Add version/revision macros for QCA9531

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agocarl9170: use ether_addr_equal_64bits
Julia Lawall [Mon, 30 Dec 2013 18:15:07 +0000 (19:15 +0100)]
carl9170: use ether_addr_equal_64bits

Ether_addr_equal_64bits is more efficient than ether_addr_equal, and can be
used when each argument is an array within a structure that contains at
least two bytes of data beyond the array.

The structures involved are:
ieee80211_hdr defined in include/linux/ieee80211.h,
ieee80211_bar defined in include/linux/ieee80211.h and
ath_common defined in drivers/net/wireless/ath/ath.h

This was done using Coccinelle (http://coccinelle.lip6.fr/).

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoat76c50x-usb: use ether_addr_equal_64bits
Julia Lawall [Mon, 30 Dec 2013 18:15:06 +0000 (19:15 +0100)]
at76c50x-usb: use ether_addr_equal_64bits

Ether_addr_equal_64bits is more efficient than ether_addr_equal, and can be
used when each argument is an array within a structure that contains at
least two bytes of data beyond the array.

The structures involved are:
at76_priv defined in drivers/net/wireless/at76c50x-usb.h and
ieee80211_mgmt defined in include/linux/ieee80211.h

This was done using Coccinelle (http://coccinelle.lip6.fr/).

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoipw2x00: use ether_addr_equal_64bits
Julia Lawall [Mon, 30 Dec 2013 18:15:05 +0000 (19:15 +0100)]
ipw2x00: use ether_addr_equal_64bits

Ether_addr_equal_64bits is more efficient than ether_addr_equal, and can be
used when each argument is an array within a structure that contains at
least two bytes of data beyond the array.

The structure involved is
libipw_network defined in drivers/net/wireless/ipw2x00/libipw.h

This was done using Coccinelle (http://coccinelle.lip6.fr/).

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: use ether_addr_equal_64bits
Julia Lawall [Mon, 30 Dec 2013 18:15:04 +0000 (19:15 +0100)]
ath9k: use ether_addr_equal_64bits

Ether_addr_equal_64bits is more efficient than ether_addr_equal, and can be
used when each argument is an array within a structure that contains at
least two bytes of data beyond the array.

The structures involved are:
ieee80211_hdr defined in include/linux/ieee80211.h
ath_common defined in drivers/net/wireless/ath/ath.h

This was done using Coccinelle (http://coccinelle.lip6.fr/).

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoiwlegacy: use ether_addr_equal_64bits
Julia Lawall [Mon, 30 Dec 2013 18:15:03 +0000 (19:15 +0100)]
iwlegacy: use ether_addr_equal_64bits

Ether_addr_equal_64bits is more efficient than ether_addr_equal, and can be
used when each argument is an array within a structure that contains at
least two bytes of data beyond the array.

The structures involved are:
ieee80211_hdr defined in include/linux/ieee80211.h,
il_priv defined in drivers/net/wireless/iwlegacy/common.h and
il_rxon_cmd defined in drivers/net/wireless/iwlegacy/commands.h

This was done using Coccinelle (http://coccinelle.lip6.fr/).

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: use ether_addr_equal_64bits
Julia Lawall [Mon, 30 Dec 2013 18:15:02 +0000 (19:15 +0100)]
rtlwifi: use ether_addr_equal_64bits

Ether_addr_equal_64bits is more efficient than ether_addr_equal, and can be
used when each argument is an array within a structure that contains at
least two bytes of data beyond the array.

The structures involved are:
ieee80211_hdr defined in include/linux/ieee80211.h and
rtl_mac defined in drivers/net/wireless/rtlwifi/wifi.h

This was done using Coccinelle (http://coccinelle.lip6.fr/).

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwl8k: use ether_addr_equal_64bits
Julia Lawall [Mon, 30 Dec 2013 18:15:01 +0000 (19:15 +0100)]
mwl8k: use ether_addr_equal_64bits

Ether_addr_equal_64bits is more efficient than ether_addr_equal, and can be
used when each argument is an array within a structure that contains at
least two bytes of data beyond the array.

The structures involved are:
ieee80211_hdr defined in include/linux/ieee80211.h and
mwl8k_priv defined in drivers/net/wireless/mwl8k.c

This was done using Coccinelle (http://coccinelle.lip6.fr/).

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agop54: use ether_addr_equal_64bits
Julia Lawall [Mon, 30 Dec 2013 18:14:59 +0000 (19:14 +0100)]
p54: use ether_addr_equal_64bits

Ether_addr_equal_64bits is more efficient than ether_addr_equal, and can be
used when each argument is an array within a structure that contains at
least two bytes of data beyond the array.

The structures involved are:
ieee80211_hdr defined in include/linux/ieee80211.h and
p54_common defined in drivers/net/wireless/p54/p54.h

This was done using Coccinelle (http://coccinelle.lip6.fr/).

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath5k: use ether_addr_equal_64bits
Julia Lawall [Mon, 30 Dec 2013 18:14:58 +0000 (19:14 +0100)]
ath5k: use ether_addr_equal_64bits

Ether_addr_equal_64bits is more efficient than ether_addr_equal, and can be
used when each argument is an array within a structure that contains at
least two bytes of data beyond the array.

The structures involved are:
ieee80211_mgmt defined in include/linux/ieee80211.h and
ath_common defined in drivers/net/wireless/ath/ath.h

This was done using Coccinelle (http://coccinelle.lip6.fr/).

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: use ether_addr_equal_64bits
Julia Lawall [Mon, 30 Dec 2013 18:14:57 +0000 (19:14 +0100)]
rt2x00: use ether_addr_equal_64bits

Ether_addr_equal_64bits is more efficient than ether_addr_equal, and can be
used when each argument is an array within a structure that contains at
least two bytes of data beyond the array.

The structures involved are:
ieee80211_bar defined in include/linux/ieee80211.h and
rt2x00_bar_list_entry defined in drivers/net/wireless/rt2x00/rt2x00.h.

This was done using Coccinelle (http://coccinelle.lip6.fr/).

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix interrupt statistics
Sujith Manoharan [Sat, 28 Dec 2013 04:17:15 +0000 (09:47 +0530)]
ath9k: Fix interrupt statistics

Initialize "sync_cause" to zero since commit
"ath9k: move ath9k_debug_sync_cause out of ath9k_hw"
fills it conditionally based on ISR status.
Not doing this results in garbage values in debugfs.

Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Remove unused config option ack_6mb
Sujith Manoharan [Sat, 28 Dec 2013 04:17:14 +0000 (09:47 +0530)]
ath9k: Remove unused config option ack_6mb

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix AR9100 chip power-on
Sujith Manoharan [Sat, 28 Dec 2013 04:17:13 +0000 (09:47 +0530)]
ath9k: Fix AR9100 chip power-on

AR9100 requires a larger delay after waking up
the RTC.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Cleanup __ath9k_hw_init()
Sujith Manoharan [Sat, 28 Dec 2013 04:17:12 +0000 (09:47 +0530)]
ath9k: Cleanup __ath9k_hw_init()

* Move initialization of config variables to
  ath9k_hw_init_config().

* Move initialization of defaults to ath9k_hw_init_defaults().

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Handle unsupported MAC versions early
Sujith Manoharan [Sat, 28 Dec 2013 04:17:11 +0000 (09:47 +0530)]
ath9k: Handle unsupported MAC versions early

There is no point in trying to bring up the chip when
the MAC version is not present in the supported list.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Move private HW callbacks to hw-ops.h
Sujith Manoharan [Sat, 28 Dec 2013 04:17:10 +0000 (09:47 +0530)]
ath9k: Move private HW callbacks to hw-ops.h

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Remove unused functions
Sujith Manoharan [Sat, 28 Dec 2013 04:17:09 +0000 (09:47 +0530)]
ath9k: Remove unused functions

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix "cc_lock" usage
Sujith Manoharan [Thu, 26 Dec 2013 02:44:40 +0000 (08:14 +0530)]
ath9k: Fix "cc_lock" usage

IRQ save/restore is not required for the cycle counters
since they are accessed only from softirq and process context.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Process BB watchdog events in the tasklet
Sujith Manoharan [Tue, 24 Dec 2013 05:14:26 +0000 (10:44 +0530)]
ath9k: Process BB watchdog events in the tasklet

Move the BB processing code to the tasklet and avoid
doing it in the ISR, there is no real benefit and this
makes the ISR less heavy.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Remove RX Poll
Sujith Manoharan [Tue, 24 Dec 2013 05:14:25 +0000 (10:44 +0530)]
ath9k: Remove RX Poll

This patch removes the convoluted and hacky method of
monitoring for connectivity. We rely on mac80211's connection
loss logic and doing it in the driver is not necessary.

The HW check for MAC/BB hangs is also simplified, there
is no need to have a separate work instance for it.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix baseband watchdog reset
Sujith Manoharan [Tue, 24 Dec 2013 05:14:24 +0000 (10:44 +0530)]
ath9k: Fix baseband watchdog reset

Do a HW reset only for required signatures.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Identify baseband watchdog signatures
Sujith Manoharan [Tue, 24 Dec 2013 05:14:23 +0000 (10:44 +0530)]
ath9k: Identify baseband watchdog signatures

A full HW reset is not required for all baseband watchdog
signatures. Some BB watchdog updates are benign and can
be discarded, some require re-programming of certain registers
and others require a chip reset.

This patch adds a routine to identify such signatures.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix baseband watchdog interrupts
Sujith Manoharan [Tue, 24 Dec 2013 05:14:22 +0000 (10:44 +0530)]
ath9k: Fix baseband watchdog interrupts

Program the required baseband watchdog interrupt
mask to ensure that the correct watchdog interrupts
are raised when the BB is hung for some reason.

Also, use the capability HW_BB_WATCHDOG instead of
relying on other flags.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix PHY restart workaround
Sujith Manoharan [Tue, 24 Dec 2013 05:14:21 +0000 (10:44 +0530)]
ath9k: Fix PHY restart workaround

The PHY restart workaround that handles baseband hangs
for packets with unsupported rates is required only
for a HW bug in AR9300 v2.2. All the subsequent chips in
the AR9003 family do not require this driver fix since
it has been addressed in the HW.

Since the value of the AR_PHY_RESTART register is written
with the default initvals, make sure that PHY restart is
always disabled once this particular BB hang signaure has
been encountered.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix MAC HW hang check for AR9003
Sujith Manoharan [Tue, 24 Dec 2013 05:14:20 +0000 (10:44 +0530)]
ath9k: Fix MAC HW hang check for AR9003

The current method of identifying MAC hangs is
convoluted and also, the signatures are wrong and
don't apply to all the chips in the AR9003 family.
Fix this by cleaning up the code and checking for
the correct hang signatures.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Add HW callbacks for MAC/BB hang checks
Sujith Manoharan [Tue, 24 Dec 2013 05:14:19 +0000 (10:44 +0530)]
ath9k: Add HW callbacks for MAC/BB hang checks

This is required for adding separate hang check
routines for AR9002 and AR9003.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Register supported HW hang checks
Sujith Manoharan [Tue, 24 Dec 2013 05:14:18 +0000 (10:44 +0530)]
ath9k: Register supported HW hang checks

HW hang checks have to be done on a per-chip basis.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix max AMPDU size calculation
Sujith Manoharan [Tue, 24 Dec 2013 05:14:17 +0000 (10:44 +0530)]
ath9k: Fix max AMPDU size calculation

The maximum A-MPDU size is calculated in ath_tx_aggr_start(),
so there is no need to do it in node_attach() too. Also, make
sure that the correct size is calculated as described in
8.4.2.58.3.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agonet: wireless: brcm80211: Drop debug version with build date/time
Josh Triplett [Mon, 23 Dec 2013 21:55:03 +0000 (13:55 -0800)]
net: wireless: brcm80211: Drop debug version with build date/time

The kernel already has this information, and individual drivers
shouldn't duplicate that.  This also eliminates the use of __DATE__ and
__TIME__, which make the build non-deterministic.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_hw: fix TSF offset calculation
Felix Fietkau [Fri, 20 Dec 2013 16:02:24 +0000 (17:02 +0100)]
ath9k_hw: fix TSF offset calculation

Since the unit is microseconds and not milliseconds, tv_sec needs to be
multiplied by 1000000, not 1000.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_hw: fix gentimer callback without overflow handler
Felix Fietkau [Fri, 20 Dec 2013 15:18:45 +0000 (16:18 +0100)]
ath9k_hw: fix gentimer callback without overflow handler

If a gentimer has both the trigger and the overflow bits set, only
mask out the trigger bit if an overflow handler is present.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: fix sparse non static symbol warning
Wei Yongjun [Fri, 20 Dec 2013 02:22:51 +0000 (10:22 +0800)]
ath9k: fix sparse non static symbol warning

Fixes the following sparse warning:

drivers/net/wireless/ath/ath9k/spectral.c:500:24: warning:
 symbol 'rfs_spec_scan_cb' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agodrivers/net/wireless/hostap: Integer overflow
Wenliang Fan [Wed, 18 Dec 2013 05:56:12 +0000 (13:56 +0800)]
drivers/net/wireless/hostap: Integer overflow

The local variable 'value' comes from 'extra', a parameter of function
'prism2_ioctl_priv_prism2_param'. If a large number passed to 'value',
there would be an integer overflow in the following line:
local->passive_scan_timer.expires = jiffies +
local->passive_scan_interval * HZ

Signed-off-by: Wenliang Fan <fanwlexca@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Fri, 3 Jan 2014 20:34:41 +0000 (15:34 -0500)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

10 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac802...
John W. Linville [Fri, 3 Jan 2014 20:25:15 +0000 (15:25 -0500)]
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211-next

10 years agoiwlwifi: mvm: fix coccinelle warnings
Fengguang Wu [Tue, 31 Dec 2013 09:04:18 +0000 (11:04 +0200)]
iwlwifi: mvm: fix coccinelle warnings

drivers/net/wireless/iwlwifi/mvm/led.c:106:2-3: Unneeded semicolon

 Removes unneeded semicolon.

Generated by: coccinelle/misc/semicolon.cocci

CC: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: Update Copyright to 2014
Emmanuel Grumbach [Mon, 30 Dec 2013 11:15:54 +0000 (13:15 +0200)]
iwlwifi: Update Copyright to 2014

Happy new year!

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rs: fix a potential NULL deref
Eyal Shapira [Mon, 23 Dec 2013 14:26:41 +0000 (16:26 +0200)]
iwlwifi: mvm: rs: fix a potential NULL deref

Found by klocwork analysis.
mvm could be NULL which may cause a NULL dereference
in a theoretical call flow

rs_fill_lq_cmd(mvm = NULL, ...)
rs_build_rates_table
rs_fill_rates_for_column
ucode_rate_from_rs_rate
IWL_ERR(mvm,...)

No real reason for passing NULL to rs_fill_lq_cmd so fix that.

Reported-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: dynamically update tsf_id
Ilan Peer [Mon, 23 Dec 2013 20:18:02 +0000 (22:18 +0200)]
iwlwifi: mvm: dynamically update tsf_id

Currently, the MAC context tsf_id assignment and the master/slave
relations are determined only when a new vif is added, as part
of the MAC context resource allocation. However, at this stage, the
beacon interval is not known, and thus could not be taken into account
in the master-slave algorithm.

To fix this, recalculate the MAC context tsf_id assignment,
just before the MAC context is activated, i.e., just before
a station VMAC is configured to associated and before an AP
VMAC is started.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: change the parameters for calculating an AP TBTT
Ilan Peer [Tue, 24 Dec 2013 15:17:05 +0000 (17:17 +0200)]
iwlwifi: mvm: change the parameters for calculating an AP TBTT

Change the parameters for calculating an AP TBTT to 64/36 instead of
80/20, to increase the interval between a station vif and an AP
vif TBTT events.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: Fix CSR_RESET operation access type
Eran Harary [Wed, 11 Dec 2013 06:13:50 +0000 (08:13 +0200)]
iwlwifi: pcie: Fix CSR_RESET operation access type

The access to the CSR_RESET reg should be done as a complete
DWORD and not by setting a bit. This is the right way to reset
the device.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: Add a missed beacons threshold
Ilan Peer [Tue, 24 Dec 2013 20:08:14 +0000 (22:08 +0200)]
iwlwifi: mvm: Add a missed beacons threshold

Instead of always calling ieee80211_beacon_loss() on every missed
beacons notification, call this function only if the number of
consecutive missed beacons from last rx is higher than a predefined
threshold.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: squash a spurious warning on chnctx change
Arik Nemtsov [Sun, 29 Dec 2013 15:57:53 +0000 (17:57 +0200)]
iwlwifi: mvm: squash a spurious warning on chnctx change

If the channel min-width changes, we can update the PHY ctx, even if
it has multiple references.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: dump to debugfs the SRAM as binary
Emmanuel Grumbach [Tue, 24 Dec 2013 12:58:29 +0000 (14:58 +0200)]
iwlwifi: mvm: dump to debugfs the SRAM as binary

This allows to format it at will using external tools.
Since different teams want it in different formats, dump
the raw data and everyone can play with the data the way
they want.

While at it - make this code slightly more robust by making
the required verification on the offsets / length in the
write handler.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: BT Coex - update channel inihibition for channel 14
Emmanuel Grumbach [Tue, 24 Dec 2013 08:55:24 +0000 (10:55 +0200)]
iwlwifi: mvm: BT Coex - update channel inihibition for channel 14

This channel inhibition for channel 14 was wrong. Fix it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: fix harmless smatch / coccinelle warnings
Emmanuel Grumbach [Sun, 22 Dec 2013 08:55:47 +0000 (10:55 +0200)]
iwlwifi: mvm: fix harmless smatch / coccinelle warnings

Don't check if mvm->fw->cs is NULL since it can't be.
cs is an array member of iwl_fw, it can't be NULL.

Use memset(ptr, 0, sizeof(*ptr)); instead of
memset(ptr, 0, sizeof(struct ptr_type));

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: disable the device as soon as RFKILL fires
Emmanuel Grumbach [Thu, 19 Dec 2013 20:20:58 +0000 (22:20 +0200)]
iwlwifi: mvm: disable the device as soon as RFKILL fires

The firmware needs to be stopped quickly (100ms) after the
RFKILL interrupt fired. Failing to do so would allow the
firmware to access the radio registers which would lead to
a hardware error.

Before this change, we would kill the firmware only when
mac80211 stops the device which can take a fair amount of
time. Take a shortcut by stopping the device right away
in the interrupt.

This is not relevant if the current firmware is INIT
firmware since that firmware can run while in RFKILL.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: allow the op_mode to call stop_device whenever it wants
Emmanuel Grumbach [Thu, 19 Dec 2013 20:19:17 +0000 (22:19 +0200)]
iwlwifi: pcie: allow the op_mode to call stop_device whenever it wants

Calling stop_device when start_fw wasn't called would issue:
Stopping tx queues that aren't allocated...

Also allow the op_mode to call stop_device and then to
disable the Tx queues - in that case just silently ignore
the disabling on the Tx queues, since the PRPH registers
aren't reachable any more.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: don't update the op_mode if rfkill hasn't changed
Emmanuel Grumbach [Sun, 22 Dec 2013 13:13:01 +0000 (15:13 +0200)]
iwlwifi: pcie: don't update the op_mode if rfkill hasn't changed

This is useless and introduces a dependency between rfkill
and stop_device - the op_mode can't call stop_device from
the rfkill notification since it would lead to an endless
recursion.
Next patches will need to do so.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: keep the NIC awake when commands are in flight
Emmanuel Grumbach [Sun, 22 Dec 2013 13:09:40 +0000 (15:09 +0200)]
iwlwifi: pcie: keep the NIC awake when commands are in flight

Under very specific circumstances, the firmware might
ignore a host command. This was debugged and we ended up
seeing that the power management hardware was faulty.
In order to workaround this issue, we keep the NIC awake
as long as we have host commands in flight. This will avoid
to put the hardware into buggy condition.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: fix possible memory leak
Eytan Lifshitz [Wed, 18 Dec 2013 21:05:06 +0000 (23:05 +0200)]
iwlwifi: mvm: fix possible memory leak

In case of invalid section_id, the function returns after
it aleready allocated memory. Fixed by change the order of actions.

Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: fix AC / FIFO mapping
Emmanuel Grumbach [Thu, 19 Dec 2013 14:50:49 +0000 (16:50 +0200)]
iwlwifi: mvm: fix AC / FIFO mapping

The AC / fifo mapping was wrong - BE packets landed in VO
FIFO. The iwl_mvm_tx_fifo enumeration isn't in the same
order as ieee80211_ac_numbers enumeration.
Since the firmware relies on fifo / ac mapping - this led
to wrong behavior. E.g. the firmware sends beacon with the
same QoS parameters as VO, and it actually took the
parameters of BK. There are probably more severe issues.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: use don't disable interrupt when rxq->lock is taken
Emmanuel Grumbach [Wed, 11 Dec 2013 08:22:28 +0000 (10:22 +0200)]
iwlwifi: pcie: use don't disable interrupt when rxq->lock is taken

This lock was never acquired in the primary interrupt
handler, but since it was acquired along with irq_lock
which had to disable interrupts, rxq->lock had to disable
interrupts too.
Now that trans_pcie->irq_lock isn't acquired in the primary
interrupt handler, rxq->lock can let interrupt enabled.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: use don't disable interrupt when irq_lock is taken
Emmanuel Grumbach [Wed, 11 Dec 2013 08:22:28 +0000 (10:22 +0200)]
iwlwifi: pcie: use don't disable interrupt when irq_lock is taken

Since we don't take this lock in the primary interrupt
handler, there is no pointin disabling the interrupt
in the critical section protected by trans_pcie->irq_lock.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: move interrupt prints to the common handler
Emmanuel Grumbach [Wed, 11 Dec 2013 07:39:30 +0000 (09:39 +0200)]
iwlwifi: pcie: move interrupt prints to the common handler

Handling interrupt with no cause and printing logs doesn't
need to be ICT / non-ICT specific move this to the common
code.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: no need to save inta in trans_pcie
Emmanuel Grumbach [Wed, 11 Dec 2013 07:24:39 +0000 (09:24 +0200)]
iwlwifi: pcie: no need to save inta in trans_pcie

This was useful when the handling was not in the same
context as the interrupt cause retrieval: we could have
several hard interrupts until the handler gets called.
Since we retrieve the interrupt cause in the handler itself,
there is no need to OR the interrupt causes.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: return inta from iwl_pcie_int_cause_{non_}ict
Emmanuel Grumbach [Wed, 11 Dec 2013 07:20:34 +0000 (09:20 +0200)]
iwlwifi: pcie: return inta from iwl_pcie_int_cause_{non_}ict

These functions are meant to return an interrupt cause and
not an irqreturn_t.
We still return IRQ_HANDLED if we had an error and IRQ_NONE
if our device hasn't fired any interrupt.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoath9k: simplify/fix tx packet TID handling
Felix Fietkau [Thu, 19 Dec 2013 17:01:51 +0000 (18:01 +0100)]
ath9k: simplify/fix tx packet TID handling

mac80211 guarantees that skb->priority is set to the TID, so use it
instead of trying to parse the QoS header manually.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: fix TSF offset precision issue
Felix Fietkau [Thu, 19 Dec 2013 17:01:50 +0000 (18:01 +0100)]
ath9k: fix TSF offset precision issue

Dividing the beacon interval by ATH_BCBUF (8) truncates the result for
the default beacon interval of 100.
Fix the calculation by moving the division after conversion from TU to
microseconds.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: call ath9k_set_tsfadjust from ath9k_beacon_config
Felix Fietkau [Thu, 19 Dec 2013 17:01:49 +0000 (18:01 +0100)]
ath9k: call ath9k_set_tsfadjust from ath9k_beacon_config

Make that function and ath9k_allow_beacon_config static

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: move ath9k_debug_sync_cause out of ath9k_hw
Felix Fietkau [Thu, 19 Dec 2013 17:01:48 +0000 (18:01 +0100)]
ath9k: move ath9k_debug_sync_cause out of ath9k_hw

ath9k_hw should not depend on any ath9k data structures like ath_softc

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobcma: add missing put_device call
Levente Kurusa [Thu, 19 Dec 2013 15:06:52 +0000 (16:06 +0100)]
bcma: add missing put_device call

This is required so that we give up the last reference to the device.

Signed-off-by: Levente Kurusa <levex@linux.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomac80211: Add support for QoS mapping
Kyeyoon Park [Tue, 17 Dec 2013 07:04:43 +0000 (23:04 -0800)]
mac80211: Add support for QoS mapping

Implement set_qos_map() handler for mac80211 to enable QoS mapping
functionality.

Signed-off-by: Kyeyoon Park <kyeyoonp@qca.qualcomm.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agocfg80211: Add support for QoS mapping
Kyeyoon Park [Tue, 17 Dec 2013 07:01:30 +0000 (23:01 -0800)]
cfg80211: Add support for QoS mapping

This allows QoS mapping from external networks to be implemented as
defined in IEEE Std 802.11-2012, 10.24.9. APs can use this to advertise
DSCP ranges and exceptions for mapping frames to a specific UP over
Wi-Fi.

The payload of the QoS Map Set element (IEEE Std 802.11-2012, 8.4.2.97)
is sent to the driver through the new NL80211_ATTR_QOS_MAP attribute to
configure the local behavior either on the AP (based on local
configuration) or on a station (based on information received from the
AP).

Signed-off-by: Kyeyoon Park <kyeyoonp@qca.qualcomm.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agonl80211: support vendor-specific events
Johannes Berg [Wed, 18 Dec 2013 13:43:31 +0000 (14:43 +0100)]
nl80211: support vendor-specific events

In addition to vendor-specific commands, also support vendor-specific
events. These must be registered with cfg80211 before they can be used.
They're also advertised in nl80211 in the wiphy information so that
userspace knows can be expected. The events themselves are sent on a
new multicast group called "vendor".

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: add helper functions for tracking P2P NoA state
Felix Fietkau [Mon, 16 Dec 2013 20:49:14 +0000 (21:49 +0100)]
mac80211: add helper functions for tracking P2P NoA state

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: fix iflist_mtx/mtx locking in radar detection
Johannes Berg [Wed, 18 Dec 2013 08:43:33 +0000 (09:43 +0100)]
mac80211: fix iflist_mtx/mtx locking in radar detection

The scan code creates an iflist_mtx -> mtx locking dependency,
and a few other places, notably radar detection, were creating
the opposite dependency, causing lockdep to complain. As scan
and radar detection are mutually exclusive, the deadlock can't
really happen in practice, but it's still bad form.

A similar issue exists in the monitor mode code, but this is
only used by channel-context drivers right now and those have
to have hardware scan, so that also can't happen.

Still, fix these issues by making some of the channel context
code require the mtx to be held rather than acquiring it, thus
allowing the monitor/radar callers to keep the iflist_mtx->mtx
lock ordering.

While at it, also fix access to the local->scanning variable
in the radar code, and document that radar_detect_enabled is
now properly protected by the mtx.

All this would now introduce an ABBA deadlock between the DFS
work cancelling and local->mtx, so change the locking there a
bit to not need to use cancel_delayed_work_sync() but be able
to just use cancel_delayed_work(). The work is also safely
stopped/removed when the interface is stopped, so no extra
changes are needed.

Reported-by: Kalle Valo <kvalo@qca.qualcomm.com>
Tested-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: remove unnecessary iflist_mtx locking
Johannes Berg [Wed, 18 Dec 2013 18:44:59 +0000 (19:44 +0100)]
mac80211: remove unnecessary iflist_mtx locking

The radar detection code changed a few times, and due to
the changes some iflist_mtx locking stayed in that isn't
actually necessary - remove it.

One version of the code needed it because an AP interface's
VLAN list was changed to use this, but then we moved the
list handling outside of the chanctx handling and thus the
locking was no longer needed.

Tested-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: align struct ps_data.tim to unsigned long
Joe Perches [Thu, 19 Dec 2013 00:52:17 +0000 (16:52 -0800)]
mac80211: align struct ps_data.tim to unsigned long

Its address is used as an unsigned long *, so make sure
that the tim u8 array is properly aligned.

Signed-off-by: Joe Perches <joe@perches.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoath9k: Use a subroutine for the AR9330 reset WAR
Sujith Manoharan [Wed, 18 Dec 2013 04:23:27 +0000 (09:53 +0530)]
ath9k: Use a subroutine for the AR9330 reset WAR

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix RTC reset delay
Sujith Manoharan [Wed, 18 Dec 2013 04:23:26 +0000 (09:53 +0530)]
ath9k: Fix RTC reset delay

The delay that is required after issuing a RTC reset
varies for each chip. Handle this properly.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Add a delay between RTC reset/clear for AR9003
Sujith Manoharan [Wed, 18 Dec 2013 04:23:25 +0000 (09:53 +0530)]
ath9k: Add a delay between RTC reset/clear for AR9003

The small delay that is present between a RTC reset/clear
operation is required for the chip to settle and this is
needed for all chips, not just the AR9002 family.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix regulatory compliance
Sujith Manoharan [Wed, 18 Dec 2013 04:23:23 +0000 (09:53 +0530)]
ath9k: Fix regulatory compliance

To comply with ETSI regulations, make sure that
the CCA registers are programmed with the threshold
values from the EEPROM/Caldata. A new field is used
to indicate if the card has been calibrated with the
required threshold information.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Update BaseExtension_1 eeprom structure
Sujith Manoharan [Wed, 18 Dec 2013 04:23:22 +0000 (09:53 +0530)]
ath9k: Update BaseExtension_1 eeprom structure

* Add a new field "misc_enable"
* Use int_8 for tempslopextension.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Initialize "switchcomspdt" eeprom field explicitly
Sujith Manoharan [Wed, 18 Dec 2013 04:23:21 +0000 (09:53 +0530)]
ath9k: Initialize "switchcomspdt" eeprom field explicitly

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Remove unneeded ref. count initialization
Sujith Manoharan [Wed, 18 Dec 2013 04:23:20 +0000 (09:53 +0530)]
ath9k: Remove unneeded ref. count initialization

The interrupt reference counter is always initialized
in ath9k_start().

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Cleanup ath9k.h
Sujith Manoharan [Wed, 18 Dec 2013 04:23:19 +0000 (09:53 +0530)]
ath9k: Cleanup ath9k.h

* Remove unused macros.
* Move definitions to appropriate sections.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Cleanup spectral scan code
Sujith Manoharan [Wed, 18 Dec 2013 04:23:18 +0000 (09:53 +0530)]
ath9k: Cleanup spectral scan code

* Move definitions to spectral.h
* Move processing/debug code to spectral.c

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowireless: update MAINTAINERS
Luis R. Rodriguez [Sat, 14 Dec 2013 19:11:39 +0000 (20:11 +0100)]
wireless: update MAINTAINERS

I've thrown the towel at QCA.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: properly preserve TSF across reset
Felix Fietkau [Sat, 14 Dec 2013 17:03:45 +0000 (18:03 +0100)]
ath9k: properly preserve TSF across reset

The beacon code previously reset TSF on every configuration call, as
some of the code was not prepared to properly calculate nexttbtt based
on current TSF.

This patch adds a common function for calculating nexttbtt and moves the
TSF reset to driver start.

This should improve AP mode compatibility with various stations that
expect the TSF to not randomly jump due to hardware resets.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_hw: clean up station beacon timer API
Felix Fietkau [Sat, 14 Dec 2013 17:03:44 +0000 (18:03 +0100)]
ath9k_hw: clean up station beacon timer API

Remove unused fields, pass timer info in usec instead of TU.
Preparation for fixing nexttbtt calculation

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_hw: remove spur related unused defines
Felix Fietkau [Sat, 14 Dec 2013 17:03:43 +0000 (18:03 +0100)]
ath9k_hw: remove spur related unused defines

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_hw: remove additional_swba_backoff
Felix Fietkau [Sat, 14 Dec 2013 17:03:42 +0000 (18:03 +0100)]
ath9k_hw: remove additional_swba_backoff

It is unused

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_hw: simplify spur channel handling
Felix Fietkau [Sat, 14 Dec 2013 17:03:41 +0000 (18:03 +0100)]
ath9k_hw: simplify spur channel handling

Remove ah->config.spurmode and ah->config.spurchans, always use EEPROM
data.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_hw: remove ah->config.pcie_clock_req
Felix Fietkau [Sat, 14 Dec 2013 17:03:40 +0000 (18:03 +0100)]
ath9k_hw: remove ah->config.pcie_clock_req

It is unused

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_hw: remove defunct ad-hoc mode ATIM window handling code
Felix Fietkau [Sat, 14 Dec 2013 17:03:39 +0000 (18:03 +0100)]
ath9k_hw: remove defunct ad-hoc mode ATIM window handling code

The hardware does not have support for ATIM processing, and the driver
does not set up ah->atim_window anywhere. Additionally, the code can
clobber the timer used by P2P powersave.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>