]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
10 years agoNFC: nfc_sock_link() can be static
Fengguang Wu [Sun, 25 May 2014 22:53:10 +0000 (00:53 +0200)]
NFC: nfc_sock_link() can be static

CC: Hiren Tandel <hirent@marvell.com>
CC: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: digital: digital_in_send_attrib_req() can be static
Fengguang Wu [Sun, 25 May 2014 22:52:15 +0000 (00:52 +0200)]
NFC: digital: digital_in_send_attrib_req() can be static

CC: "Mark A. Greer" <mgreer@animalcreek.com>
CC: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: dts: st21nfca_i2c: Correct minor typo in documentation
Christophe Ricard [Tue, 20 May 2014 19:45:04 +0000 (21:45 +0200)]
NFC: dts: st21nfca_i2c: Correct minor typo in documentation

Replaced st,st21nfca-i2c by st,st21nfca_i2c to be concistent
with below configuration and driver in drivers/nfc/st21nfca/

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: digital: Randomize poll cycles
Thierry Escande [Sat, 10 May 2014 11:06:02 +0000 (13:06 +0200)]
NFC: digital: Randomize poll cycles

This change adds some entropy to polling cycles, choosing the next
polling rf technology randomly. This reflects the change done in the
pn533 driver, avoiding possible infinite loop for devices that export 2
targets on 2 different modulations. If the first target is not
readable, we will stay in an error loop for ever.

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: digital: Return proper error code when sending ATR_REQ
Thierry Escande [Fri, 11 Apr 2014 22:03:08 +0000 (00:03 +0200)]
NFC: digital: Return proper error code when sending ATR_REQ

The error code returned by digital_in_send_cmd() was not returned by
digital_in_send_atr_req().

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: port100: Add support for type 4B tag
Thierry Escande [Fri, 11 Apr 2014 22:03:17 +0000 (00:03 +0200)]
NFC: port100: Add support for type 4B tag

This patch adds support for ISO-DEP protocol over NFC-B rf technology
by adding NFC_PROTO_ISO14443_B to the supported protocols and an entry
for framing configuration.

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agomwifiex: use 'const' qualifier for 2nd arg of mwifiex_tdls_add_ht_oper
John W. Linville [Thu, 22 May 2014 18:21:12 +0000 (14:21 -0400)]
mwifiex: use 'const' qualifier for 2nd arg of mwifiex_tdls_add_ht_oper

Fixes the following warning:

  CC      drivers/net/wireless/mwifiex/tdls.o
drivers/net/wireless/mwifiex/tdls.c: In function ‘mwifiex_prep_tdls_encap_data’:
drivers/net/wireless/mwifiex/tdls.c:475:4: warning: passing argument 2 of ‘mwifiex_tdls_add_ht_oper’ discards ‘const’ qualifier from pointer target type [enabled by
default]
    ret = mwifiex_tdls_add_ht_oper(priv, peer, 1, skb);
    ^
drivers/net/wireless/mwifiex/tdls.c:190:1: note: expected ‘u8 *’ but argument is of type ‘const u8 *’
 mwifiex_tdls_add_ht_oper(struct mwifiex_private *priv, u8 *mac,
 ^
drivers/net/wireless/mwifiex/tdls.c:481:4: warning: passing argument 2 of ‘mwifiex_tdls_add_ht_oper’ discards ‘const’ qualifier from pointer target type [enabled by
default]
    ret = mwifiex_tdls_add_ht_oper(priv, peer, 0, skb);
    ^
drivers/net/wireless/mwifiex/tdls.c:190:1: note: expected ‘u8 *’ but argument is of type ‘const u8 *’
 mwifiex_tdls_add_ht_oper(struct mwifiex_private *priv, u8 *mac,
 ^

Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: fix sleep timer during suspend
Rajkumar Manoharan [Thu, 22 May 2014 08:41:41 +0000 (14:11 +0530)]
ath9k: fix sleep timer during suspend

On idle state, sleep timer is scheduled to put the chip into fullsleep.
But during suspend, this timer is scheduled after the chip is moved to
fullsleep forcibily. This is causing below unnecessary error messages
in kernel log during suspend.

ath: phy2: timeout (100000 us) on reg 0x806c: 0xdeadbeef & 0x01f00000
!= 0x00000000
ath: phy2: RX failed to go idle in 10 ms RXSM=0xdeadbeef
ath: phy2: DMA failed to stop in 10 ms AR_CR=0xdeadbeef AR_DIAG_SW=0xdeadbeef
DMADBG_7=0xdeadbeef

Reported-by: Arkh4mKn1ght <arkh4mkn1ght@gmail.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Handle multiple keys while setting tx filters
Rajkumar Manoharan [Thu, 22 May 2014 07:05:49 +0000 (12:35 +0530)]
ath9k: Handle multiple keys while setting tx filters

The keycache index is used to abort transmission for given station
when it goes to sleep state. But the commit "ath9k_hw: Abort transmission
for sleeping station" is not handling multi-key station. Fix that.

Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: update seq number correctly for packets from TDLS peer
Avinash Patil [Thu, 22 May 2014 05:02:31 +0000 (22:02 -0700)]
mwifiex: update seq number correctly for packets from TDLS peer

This patch adds handling of updating rx sequence number for
packets received from TDLS peer. Current implementation of
mwifiex_queueing_ra_based assumes station would always receive
packets from AP which is not true in case of TDLS.
Fix this by adding this case.

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: set TDLS flags for AMSDU packets
Avinash Patil [Thu, 22 May 2014 05:02:30 +0000 (22:02 -0700)]
mwifiex: set TDLS flags for AMSDU packets

This patch fixes an issue where AMSDU packets for TDLS link
would flow over infra link. This happened because we were
missing setting TDLS flag in TxPD on AMSDU packets.

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: delete TDLS link upon Teardown event
Avinash Patil [Thu, 22 May 2014 05:02:29 +0000 (22:02 -0700)]
mwifiex: delete TDLS link upon Teardown event

If userspace application does not take care of TDLS teardown
event, TDLS link would be present in driver database and thus
driver would send such packets on direct link while peer has
already severed link causing data traffic failure. Disable TDLS
link upon teardown event so as to ensure this does not happen.

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: silence TDLS link delete failure for nonexistent link
Avinash Patil [Thu, 22 May 2014 05:02:28 +0000 (22:02 -0700)]
mwifiex: silence TDLS link delete failure for nonexistent link

If TDLS link delete command fails because of non-existent peer
or TDLS peer is absent from driver's entry, it means link was
already deleted. In such case print debug messages with lower
severity.

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: avoid TDLS check for packets destined to AP
Avinash Patil [Thu, 22 May 2014 05:02:27 +0000 (22:02 -0700)]
mwifiex: avoid TDLS check for packets destined to AP

In station role if TDLS is supported, we traverse TDLS peer list
to see if packet's destination address matches with TDLS peer.
Packets destined to AP are not sent over TDLS link and hence
avoid this list traversal for such packets.

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 agoath9k: fix build error with disabled debug
Zefir Kurtisi [Wed, 21 May 2014 10:40:35 +0000 (12:40 +0200)]
ath9k: fix build error with disabled debug

DFS pulse interval printing is only available
when CONFIG_ATH9K_DEBUGFS is set.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: N-PHY: add missing calib values for radio 0x2026 rev 11
Rafał Miłecki [Wed, 21 May 2014 06:44:21 +0000 (08:44 +0200)]
b43: N-PHY: add missing calib values for radio 0x2026 rev 11

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: fix list of 5 GHz channels for 802.11n cards
Rafał Miłecki [Wed, 21 May 2014 06:44:20 +0000 (08:44 +0200)]
b43: fix list of 5 GHz channels for 802.11n cards

Broadcom hardware uses a bit tricky hw_value-s for 5 GHz channels,
values 184-228 are used for 4920-5140 MHz center frequencies. Normally
you expect channels 7-16 (e.g. 5060 MHz is channel 12, not 212). We never
meant to register hw_value 228 with freq 6140 MHz (5000 + 228 * 5).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: fix typo in define name for 2 GHz channels (s/CHAN4G/CHAN2G/)
Rafał Miłecki [Wed, 21 May 2014 06:44:19 +0000 (08:44 +0200)]
b43: fix typo in define name for 2 GHz channels (s/CHAN4G/CHAN2G/)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agolibertas: fix return value when processing invalid packet
Dan Williams [Thu, 22 May 2014 12:32:41 +0000 (07:32 -0500)]
libertas: fix return value when processing invalid packet

Nothing actually uses the return value yet, but we might as well
make it correct, like process_rxed_802_11_packet() does for the
same case.  Also ensure that if monitor mode is enabled (and
thus process_rxed_802_11_packet() is called) that the debugging
enter/leave functions are balanced.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: Endless loop on hub port power down
Richard Genoud [Thu, 3 Apr 2014 14:48:56 +0000 (16:48 +0200)]
rt2x00: Endless loop on hub port power down

I've met an endless (or at least very long) loop if I power down the usb
port on witch a usb wifi key is plugged.
(Ok, it's not very smart to power down a usb port when a usb key is in
used... but still, I think that should not lead to an endless loop).

I have a lot of:
ieee80211 phy1: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0438 with error -71

(-71==-EPROTO)

How to reproduce:
- plug an usb wifi key
- ip link set wlan0 up
- hub-ctrl -b usb_bus -d usb_device -P usb_port -p 0

hub-ctrl source: https://github.com/codazoda/hub-ctrl.c/blob/master/hub-ctrl.c

The following patch prevents the endless loop, but I'm really not sure
that The Right Way To Do It (R)

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agocarl9170: fix leaks at failure path in carl9170_usb_probe()
Alexey Khoroshilov [Sat, 28 Sep 2013 03:51:51 +0000 (23:51 -0400)]
carl9170: fix leaks at failure path in carl9170_usb_probe()

carl9170_usb_probe() does not handle request_firmware_nowait() failure
that leads to several leaks in this case.
The patch adds all required deallocations.

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>
10 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Thu, 22 May 2014 18:01:43 +0000 (14:01 -0400)]
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
John W. Linville [Thu, 22 May 2014 17:58:36 +0000 (13:58 -0400)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next

10 years agoMerge tag 'nfc-next-3.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo...
John W. Linville [Thu, 22 May 2014 17:56:46 +0000 (13:56 -0400)]
Merge tag 'nfc-next-3.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next

Samuel Ortiz <sameo@linux.intel.com> says:

"NFC: 3.16: First pull request

This is the NFC pull request for 3.16. We have:

- STMicroeectronics st21nfca support. The st21nfca is an HCI chipset and
  thus relies on the HCI stack. This submission provides support for tag
  redaer/writer mode (including Type 5) and device tree bindings.

- PM runtime support and a bunch of bug fixes for TI's trf7970a.

- Device tree support for NXP's pn544. Legacy platform data support is
  obviously kept intact.

- NFC Tag type 4B support to the NFC Digital stack.

- SOCK_RAW type support to the raw NFC socket, and allow NCI
  sniffing from that. This can be extended to report HCI frames and also
  proprietarry ones like e.g. the pn533 ones."

Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agocfg80211: allow RSSI compensation
Emmanuel Grumbach [Sun, 18 May 2014 07:15:24 +0000 (10:15 +0300)]
cfg80211: allow RSSI compensation

Channels in 2.4GHz band overlap, this means that if we
send a probe request on channel 1 and then move to channel
2, we will hear the probe response on channel 2. In this
case, the RSSI will be lower than if we had heard it on
the channel on which it was sent (1 in this case).

The firmware / low level driver can parse the channel in
the DS IE or HT IE and compensate the RSSI so that it will
still have a valid value even if we heard the frame on an
adjacent channel. This can be done up to a certain offset.

Add this offset as a configuration for the low level driver.
A low level driver that can compensate the low RSSI in this
case should assign the maximal offset for which the RSSI
value is still valid.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoiwlwifi: mvm: remove vif argument from power_update_mac
Arik Nemtsov [Thu, 15 May 2014 14:31:51 +0000 (17:31 +0300)]
iwlwifi: mvm: remove vif argument from power_update_mac

The power update function looks at all current vifs to determine the power
policy. It doesn't use the current vif. Instead the value was overwritten
and used internally.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: make iwl_mvm_update_beacon_abort static
Emmanuel Grumbach [Tue, 20 May 2014 08:28:18 +0000 (11:28 +0300)]
iwlwifi: mvm: make iwl_mvm_update_beacon_abort static

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: remove debugfs hook for reduced tx power
Emmanuel Grumbach [Tue, 20 May 2014 10:54:27 +0000 (13:54 +0300)]
iwlwifi: mvm: remove debugfs hook for reduced tx power

This was not used is unlikely to be used, just kill it.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: disable reduced Tx power when not applicable
Emmanuel Grumbach [Tue, 20 May 2014 12:48:18 +0000 (15:48 +0300)]
iwlwifi: mvm: disable reduced Tx power when not applicable

I forgot to disable the reduced Tx power in a few paths.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: pass force_assoc_off all the way down to avoid hacks
Luciano Coelho [Tue, 13 May 2014 14:33:38 +0000 (17:33 +0300)]
iwlwifi: mvm: pass force_assoc_off all the way down to avoid hacks

In some cases, we need to force the association to be off in the
MAC_CONTEXT_CMD command we send to the firmware.  Instead of having to
hack the vif->bss_conf.assoc value, pass it all the way down the call
chain.

Additionally, for the iwl_mvm_mac_ctxt_add() case, we *always* set
forced_assoc_off to true, so we can remove the hack in the d3 code
that was forcing it to off by hacking the bss_conf.assoc value.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: don't filter out the first beacon
Avri Altman [Tue, 20 May 2014 05:03:24 +0000 (08:03 +0300)]
iwlwifi: mvm: don't filter out the first beacon

Enabling beacon filtering should be done only after a beacon
has been received. Doing that too early will cause
disconnections.
This has already been fixed, but the fix didn't take care
about the case where the beacon is received after the
association, it waited only for association which is not
enough.

Signed-off-by: Avri Altman <avri.altman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoMerge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-next
Emmanuel Grumbach [Wed, 21 May 2014 09:49:38 +0000 (12:49 +0300)]
Merge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-next

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Conflicts:
drivers/net/wireless/iwlwifi/mvm/mac80211.c

10 years agoiwlwifi: mvm: disable beacon filtering
Emmanuel Grumbach [Sun, 18 May 2014 16:05:23 +0000 (19:05 +0300)]
iwlwifi: mvm: disable beacon filtering

This feature has been causing trouble - disable it for now.

Cc: <stable@vger.kernel.org> [3.13+]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agocfg80211: don't set reg timeout for user-handled hint
Arik Nemtsov [Sun, 11 May 2014 08:50:44 +0000 (11:50 +0300)]
cfg80211: don't set reg timeout for user-handled hint

Otherwise every "indoor" setting by usermode will cause a regdomain reset.

Acked-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agocfg80211: implement cfg80211_get_station cfg80211 API
Antonio Quartulli [Mon, 19 May 2014 19:53:21 +0000 (21:53 +0200)]
cfg80211: implement cfg80211_get_station cfg80211 API

Implement and export the new cfg80211_get_station() API.
This utility can be used by other kernel modules to obtain
detailed information about a given wireless station.

It will be in particular useful to batman-adv which will
implement a wireless rate based metric.

Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: export the expected throughput
Antonio Quartulli [Mon, 19 May 2014 19:53:20 +0000 (21:53 +0200)]
mac80211: export the expected throughput

Add get_expected_throughput() API to mac80211 so that each
driver can implement its own version based on the RC
algorithm they are using (might be using an HW RC algo).
The API returns a value expressed in Kbps.

Also, add the new get_expected_throughput() member
to the rate_control_ops structure in order to be
able to query the RC algorithm (this patch provides an
implementation of this API for both minstrel and
minstrel_ht).

The related member in the station_info object is now
filled accordingly when dumping a station.

Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoath9k: fixup "ath9k_htc: fix build with disabled debug"
John W. Linville [Tue, 20 May 2014 19:34:37 +0000 (15:34 -0400)]
ath9k: fixup "ath9k_htc: fix build with disabled debug"

Apparently Oleksij's compile testing was no better than mine initially
was... :-(

Cc: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: xmit: set 5 GHz bit depending on current band
Rafał Miłecki [Tue, 20 May 2014 07:27:18 +0000 (09:27 +0200)]
b43: xmit: set 5 GHz bit depending on current band

PHYs other than A may also work in 5 GHz mode.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: fix build with disabled debug
Oleksij Rempel [Mon, 19 May 2014 22:02:03 +0000 (00:02 +0200)]
ath9k_htc: fix build with disabled debug

  CC [M]  drivers/net/wireless/ath/ath9k/htc_drv_txrx.o
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c: In function ‘ath9k_rx_prepare’:
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:1006:2: warning: passing argument 2 of ‘ath9k_htc_err_stat_rx’ from incompatible pointer type [enabled by default]
  ath9k_htc_err_stat_rx(priv, &rx_stats);
  ^
In file included from drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:17:0:
drivers/net/wireless/ath/ath9k/htc.h:380:20: note: expected ‘struct ath_htc_rx_status *’ but argument is of type ‘struct ath_rx_status *’
 static inline void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv,

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: add more devices to the bands database
Rafał Miłecki [Mon, 19 May 2014 21:18:55 +0000 (23:18 +0200)]
b43: add more devices to the bands database

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: move bands detection to a separated function
Rafał Miłecki [Mon, 19 May 2014 21:18:54 +0000 (23:18 +0200)]
b43: move bands detection to a separated function

This cleans code a bit and allows adding support for more devices.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agocfg80211: export expected throughput through get_station()
Antonio Quartulli [Mon, 19 May 2014 19:53:19 +0000 (21:53 +0200)]
cfg80211: export expected throughput through get_station()

Users may need information about the expected throughput
towards a given peer.
This value is supposed to consider the size overhead
generated by the 802.11 header.

This value is exported in kbps through the get_station() API
by including it into the station_info object.
Moreover, it is sent to user space when replying to the
nl80211 GET_STATION command.

This information will be useful to the batman-adv module
which will use it for its new metric computation.

Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoNFC: st21nfca: Add ISO15693 Reader/Writer support
Christophe Ricard [Tue, 13 May 2014 20:03:42 +0000 (22:03 +0200)]
NFC: st21nfca: Add ISO15693 Reader/Writer support

Add support for ISO/IEC 15693 RF technology and Type 5 tags.
ISO15963 is using proprietary gate 12.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: st21nfca: Improve load_session
Christophe Ricard [Tue, 13 May 2014 20:03:41 +0000 (22:03 +0200)]
NFC: st21nfca: Improve load_session

In case anybody uses previous patchset with the CLF, add a check to make sure
missing pipe are created.
st21nfca returns its pipe list in the creation order (most recent latest).

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: dts: st21nfca_i2c: Add DTS Documentation
Christophe Ricard [Tue, 13 May 2014 20:03:40 +0000 (22:03 +0200)]
NFC: dts: st21nfca_i2c: Add DTS Documentation

Describe the properties used by the st21nfca NFC controller driver.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: dts: st21nfca: Add device-tree (Open Firmware) support to st21nfca
Christophe Ricard [Tue, 13 May 2014 20:03:39 +0000 (22:03 +0200)]
NFC: dts: st21nfca: Add device-tree (Open Firmware) support to st21nfca

Add functions to recover hardware resources from the device-tree
when not provided by the platform data.

Based on pn544 devicetree implementation

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: NCI: Send all NCI frames to raw sockets
Hiren Tandel [Mon, 5 May 2014 10:52:27 +0000 (19:52 +0900)]
NFC: NCI: Send all NCI frames to raw sockets

So that anyone listening on SOCKPROTO_RAW for raw frames will get all
NCI frames, in both directions. This actually implements userspace NFC
NCI sniffing.
It's now up to userspace to decode those frames.

Signed-off-by: Hiren Tandel <hirent@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: Add RAW socket type support for SOCKPROTO_RAW
Hiren Tandel [Mon, 5 May 2014 10:43:31 +0000 (19:43 +0900)]
NFC: Add RAW socket type support for SOCKPROTO_RAW

This allows for a more generic NFC sniffing by using SOCKPROTO_RAW
SOCK_RAW to read RAW NFC frames. This is for sniffing anything but LLCP
(HCI, NCI, etc...).

Signed-off-by: Hiren Tandel <hirent@marvell.com>
Signed-off-by: Rahul Tank <rahult@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: NCI: No need to reverse ATR_RES Response
Hiren Tandel [Tue, 6 May 2014 06:51:50 +0000 (15:51 +0900)]
NFC: NCI: No need to reverse ATR_RES Response

ATR_RES response received within Activation Parameters is already
in correct order. Reversing it fails LLCP magic number check and
so P2P functionality fails.

Signed-off-by: Hiren Tandel <hirent@marvell.com>
Signed-off-by: Rahul Tank <rahult@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: digital: Handle multiple SENSF_REQ frames
Mark A. Greer [Wed, 23 Apr 2014 18:00:56 +0000 (11:00 -0700)]
NFC: digital: Handle multiple SENSF_REQ frames

According to section 5.15.1.3 of the NFC Activity
Specification, multiple SENSF_REQ commands can be
received by a target before it receives an ATR_REQ
command.  To handle this, add a routine that checks
whether a SENSF_REQ or ATR_REQ has been recieved.
If its a SENSF_REQ, respond appropriately and
continue waiting for a ATR_REQ.  If its an ATR_REQ,
handle it as before.

CC: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agoNFC: digital: SENSF_RES excludes RD when SENSF_REQ RC is zero
Mark A. Greer [Wed, 23 Apr 2014 18:00:55 +0000 (11:00 -0700)]
NFC: digital: SENSF_RES excludes RD when SENSF_REQ RC is zero

The check in digital_tg_send_sensf_res() that excludes
the 'RD' field from the SENSF_RES is inverted.  The 'RD'
field should be excluded when the SENSF_REQ 'RC' field
is equal to DIGITAL_SENSF_REQ_RC_NONE instead of when
its not equal.  This is described in section 6.6.2.11
of the NFC Digital Specification.

CC: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
10 years agobrcmsmac: make return of 0 explicit
Julia Lawall [Mon, 19 May 2014 08:29:29 +0000 (10:29 +0200)]
brcmsmac: make return of 0 explicit

Delete unnecessary local variable whose value is always 0 and that hides
the fact that the result is always 0.

A simplified version of the semantic patch that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
local idexpression ret;
expression e;
position p;
@@

-ret = 0;
... when != ret = e
return
- ret
+ 0
  ;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
[arend@broadcom.com: make brcms_b_detach() a void function]
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_hw: Abort transmission for sleeping station
Rajkumar Manoharan [Mon, 19 May 2014 06:14:37 +0000 (11:44 +0530)]
ath9k_hw: Abort transmission for sleeping station

The data transmission to the power save station should be aborted
immediately, whenever the station informs sleep state. Right now
the frames queued into into hardware are being transmitted until
the hardware detects the power save station based excessive retries
of the data frames due to unacknowlegdement. Then remaining frames
are returned with filetered status and might be retried later by
driver or mac80211.

Per WFA certification testing, AP should not send out more than two
frames after processing nullfunc with PM bit set from associated
station. To speed up tx filtering, the pending frames in hardware
queues for given station will be aborted immediately via tx filter
registers. This transmit filters can be ignored if the descriptor
is having invalid destination index or clear destination mask set.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: make B43_PCMCIA and B43_SDIO depend on B43_SSB
Rafał Miłecki [Sun, 18 May 2014 11:41:33 +0000 (13:41 +0200)]
b43: make B43_PCMCIA and B43_SDIO depend on B43_SSB

These are extra configs specific to the SSB. Lack of this dependency and
CONFIG_B43=y
CONFIG_B43_BUSES_BCMA=y
CONFIG_SSB=m
would result in:
> drivers/built-in.o: In function `b43_sdio_remove':
> sdio.c:(.text+0x14657f): undefined reference to `ssb_bus_unregister'
> drivers/built-in.o: In function `b43_sdio_probe':
> sdio.c:(.text+0x14672f): undefined reference to `ssb_bus_sdiobus_register'

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agossb: sprom: add dev_id field for value overriding standard ID
Rafał Miłecki [Sat, 17 May 2014 22:22:38 +0000 (00:22 +0200)]
ssb: sprom: add dev_id field for value overriding standard ID

Some devices may have different features despite sharing the same ID
(e.g. PCI ID). For example 14e4:4331 is usually a dual band, but this
can be "limited". Device with "pci/x/y/devid=0x4332" supports 2.4 GHz
only. Similarly 0x4333 will mean support for 5 GHz only.
Add entry in SPROM so info described above can be extracted and stored.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: rework band switching
Rafał Miłecki [Sat, 17 May 2014 21:24:56 +0000 (23:24 +0200)]
b43: rework band switching

We always operate on one core and simple band switch doesn't require
full core reset. Simply reset the PHY.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: complete PHY reset
Rafał Miłecki [Sat, 17 May 2014 21:24:55 +0000 (23:24 +0200)]
b43: complete PHY reset

Use separated function for taking PHY out of reset and implement reset
for BCMA.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: move PHY reset code into PHY specific file
Rafał Miłecki [Sat, 17 May 2014 21:24:54 +0000 (23:24 +0200)]
b43: move PHY reset code into PHY specific file

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: split upload of init values into 2 functions
Rafał Miłecki [Sat, 17 May 2014 21:24:53 +0000 (23:24 +0200)]
b43: split upload of init values into 2 functions

There are two groups of init values. The first one has to be uploaded
once per wireless core reset but the second one on every band switch.
To implement band switching in an optimal way allow uploading band
init values only (by using a separated function).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: remove unused allow_all_destaddr functions
Peter Wu [Thu, 20 Mar 2014 18:52:22 +0000 (19:52 +0100)]
rtlwifi: remove unused allow_all_destaddr functions

Unused as configure_filter takes care of setting/clearing RCR_AAP.

In commit "rtlwifi: rtl8723be: rtl8723com: Remove unused
allow_all_destaddr functions", Larry Finger removed allow_all_destaddr
from the struct. This commit removes the related function too.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agocfg80211: constify wowlan/coalesce mask/pattern pointers
Johannes Berg [Mon, 19 May 2014 15:59:50 +0000 (17:59 +0200)]
cfg80211: constify wowlan/coalesce mask/pattern pointers

This requires changing the nl80211 parsing code a bit to use
intermediate pointers for the allocation, but clarifies the
API towards the drivers.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agocfg80211: constify more pointers in the cfg80211 API
Johannes Berg [Mon, 19 May 2014 15:53:16 +0000 (17:53 +0200)]
cfg80211: constify more pointers in the cfg80211 API

This also propagates through the drivers.

The orinoco driver uses the cfg80211 API structs for internal
bookkeeping, and so needs a (void *) cast that removes the
const - but that's OK because it allocates those pointers.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agocfg80211: constify MAC addresses in cfg80211 ops
Johannes Berg [Mon, 19 May 2014 15:19:31 +0000 (17:19 +0200)]
cfg80211: constify MAC addresses in cfg80211 ops

This propagates through all the drivers and mac80211.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoiwlwifi: mvm: set the MAC_FILTER_IN_BEACON flag also for P2P
Luciano Coelho [Thu, 15 May 2014 10:50:01 +0000 (13:50 +0300)]
iwlwifi: mvm: set the MAC_FILTER_IN_BEACON flag also for P2P

There doesn't seem to be a good reason for not enabling the
MAC_FILTER_IN_BEACON flag for P2P client, as we do for station.

This can prevent potential, hard-to-reproduce problems during
association.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: enable MAC_FILTER_IN_BEACON when forced_assoc_off is set
Luciano Coelho [Wed, 14 May 2014 13:17:39 +0000 (16:17 +0300)]
iwlwifi: mvm: enable MAC_FILTER_IN_BEACON when forced_assoc_off is set

Set the MAC_FILTER_IN_BEACON flag in iwl_mvm_mac_ctxt_cmd_sata() also
when forced_assoc_off is set, so it's aligned with when we are not
associated.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: don't allow diversity if BT Coex / TT forbid it
Emmanuel Grumbach [Sun, 18 May 2014 06:16:45 +0000 (09:16 +0300)]
iwlwifi: mvm: don't allow diversity if BT Coex / TT forbid it

We should not allow diversity when BT Coex needs the second
antenna. Thermal Throttling can also request to stop using
the second antenna. Honour those requests.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: Remove redundant initialization
Avri Altman [Mon, 19 May 2014 05:41:05 +0000 (08:41 +0300)]
iwlwifi: mvm: Remove redundant initialization

This value is being set few lines under in set_cqm_params.

Signed-off-by: Avri Altman <avri.altman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: update power after phy_ctxt is NULL when unassigning chanctx
Luciano Coelho [Wed, 14 May 2014 07:01:14 +0000 (10:01 +0300)]
iwlwifi: mvm: update power after phy_ctxt is NULL when unassigning chanctx

iwl_mvm_power_update_mac() (more specifically
iwl_mvm_power_iterator()) relies on the phy_ctxt setting to decide
whether the vif is active or not.  When unassigning a chanctx, we
should therefore call iwl_mvm_power_update_mac() after setting
phy_chanctx to NULL.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agomac80211: fix csa_counter_offs argument name in docbook
Luciano Coelho [Thu, 15 May 2014 17:32:08 +0000 (20:32 +0300)]
mac80211: fix csa_counter_offs argument name in docbook

The csa_counter_offs was erroneously described as csa_offs in
the docbook section.

This fixes two warnings when making htmldocs (at least):

Warning(include/net/mac80211.h:3428): No description found for parameter 'csa_counter_offs[IEEE80211_MAX_CSA_COUNTERS_NUM]'
Warning(include/net/mac80211.h:3428): Excess struct/union/enum/typedef member 'csa_offs' description in 'ieee80211_mutable_offsets'

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agocfg80211: add documentation for max_num_csa_counters
Luciano Coelho [Thu, 15 May 2014 17:18:09 +0000 (20:18 +0300)]
cfg80211: add documentation for max_num_csa_counters

Move the comment in the structure to a description of the
max_num_csa_counters field in the docbook area.

This fixes a warning when building htmldocs (at least):

 Warning(include/net/cfg80211.h:3064): No description found for parameter 'max_num_csa_counters'

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: minstrel-ht: small clarifications
Johannes Berg [Mon, 19 May 2014 09:24:19 +0000 (11:24 +0200)]
mac80211: minstrel-ht: small clarifications

Antonio and I were looking over this code and some things
didn't immediately make sense, so we came up with two small
clarifications.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agowlcore: Remove trailing semicolon from do {...} while (0) macro
Joe Perches [Wed, 14 May 2014 19:15:14 +0000 (12:15 -0700)]
wlcore: Remove trailing semicolon from do {...} while (0) macro

These should not have trailing semicolons so remove them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: set valid tx_param during mwifiex_send_null_packet
Avinash Patil [Wed, 14 May 2014 02:50:13 +0000 (19:50 -0700)]
mwifiex: set valid tx_param during mwifiex_send_null_packet

While sending null packet from driver we are passing NULL
tx_param pointer to indicate there are no more packets in queue.
PCIe send routine assumes caller has done sanity check on
tx_param and may cause crash while dereferencing next_pkt_len
from tx_param.

Avoid this by passing tx_param structure with next_pkt_len as
zero instead of NULL pointer.

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: restore current SDIO write port in failure cases
Avinash Patil [Wed, 14 May 2014 02:49:42 +0000 (19:49 -0700)]
mwifiex: restore current SDIO write port in failure cases

During SDIO MP aggregation, we at first acquire current write
port to write data onto and then proceed with using this port
for SDIO write. If error occurs later in mwifiex_write_data_sync
because device is suspended or SDIO write failure, we do not
restore current write port and write bitmap. This results into
leaking one port and hole in SDIO write port bitmap.
Restore current write port and reset bitmap accordingly in
failure cases to avoid this.

Reported-by: James Cameron <quozl@laptop.org>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Reviewed-by: James Cameron <quozl@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath: add JP DFS pattern detector
Janusz Dziedzic [Tue, 13 May 2014 10:32:06 +0000 (12:32 +0200)]
ath: add JP DFS pattern detector

Add initial values for JP DFS pattern detector.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath: add DFS FCC pattern detector
Janusz Dziedzic [Tue, 13 May 2014 10:32:05 +0000 (12:32 +0200)]
ath: add DFS FCC pattern detector

Add initial values for DFS FCC pattern detector.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Tested-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agodrivers/net/wireless/ti/wl*/spi.c: Simplify CRC computation
George Spelvin [Sun, 11 May 2014 10:07:43 +0000 (06:07 -0400)]
drivers/net/wireless/ti/wl*/spi.c: Simplify CRC computation

These devices require commands stored in buffers in an odd order,
different from that in which the CRC is computed.

Rather than make two copies of the commands in two different orders,
form the commands in logical (CRC) order, append the CRC, then byte-swap
in place to the desired order.

The old code worked fine, I'm just scratching an "ugh, that's ugly"
itch.

Signed-off-by: George Spelvin <linux@horizon.com>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agodrivers/mmc/host/mmc_spi.c: Use get/put_unaligned_be32
George Spelvin [Sun, 11 May 2014 10:05:02 +0000 (06:05 -0400)]
drivers/mmc/host/mmc_spi.c: Use get/put_unaligned_be32

Very minor source and binary size reduction.

Signed-off-by: George Spelvin <linux@horizon.com>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agolib/crc7: Shift crc7() output left 1 bit
George Spelvin [Sat, 10 May 2014 14:32:57 +0000 (10:32 -0400)]
lib/crc7: Shift crc7() output left 1 bit

This eliminates a 1-bit left shift in every single caller,
and makes the inner loop of the CRC computation more efficient.

Renamed crc7 to crc7_be (big-endian) since the interface changed.

Also purged #include <linux/crc7.h> from files that don't use it at all.

Signed-off-by: George Spelvin <linux@horizon.com>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwif...
John W. Linville [Fri, 16 May 2014 18:16:17 +0000 (14:16 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

10 years agoMerge branch 'for-linville' of git://github.com/kvalo/ath
John W. Linville [Fri, 16 May 2014 18:15:28 +0000 (14:15 -0400)]
Merge branch 'for-linville' of git://github.com/kvalo/ath

10 years agoiwlwifi: fix LED support Kconfig dependencies
Johannes Berg [Tue, 13 May 2014 13:25:28 +0000 (15:25 +0200)]
iwlwifi: fix LED support Kconfig dependencies

If DVM or MVM are built-in but LEDS_CLASS isn't then the current
Kconfig will enable LED support and fail the build. Fix this by
making the LED support depend on LEDS_CLASS being built-in or,
if it is modular, only enabling it if iwlwifi also is.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: update nmi register
Liad Kaufman [Sun, 27 Apr 2014 13:46:09 +0000 (16:46 +0300)]
iwlwifi: update nmi register

In the 8000 HW family the register for forcing an NMI has
changed, so this allows to still be able to force an NMI
while taking into account the HW in order to write to the
correct register.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: combine p2p and station mac context functions
Luciano Coelho [Tue, 13 May 2014 13:52:54 +0000 (16:52 +0300)]
iwlwifi: mvm: combine p2p and station mac context functions

Instead of having two nearly identical functions to send the mac
context commands, use a single way that can handle both the p2p and
!p2p cases.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: BT Coex - send channel inhibition before association
Emmanuel Grumbach [Wed, 30 Apr 2014 15:09:59 +0000 (18:09 +0300)]
iwlwifi: mvm: BT Coex - send channel inhibition before association

The firmware needs to know on what channel we run before we
set the association bit in the MAC context. Change a bit the
flow to achieve this.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agomac80211: Handle the CSA counters correctly
Andrei Otcheretianski [Fri, 9 May 2014 11:11:50 +0000 (14:11 +0300)]
mac80211: Handle the CSA counters correctly

Make the beacon CSA counters part of ieee80211_mutable_offsets and don't
decrement CSA counters when generating a beacon template. This permits the
driver to offload the CSA counters handling. Since mac80211 updates the probe
responses with the correct counter, the driver should sync the counter's value
with mac80211 using ieee80211_csa_update_counter function.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: Provide ieee80211_beacon_get_template API
Andrei Otcheretianski [Fri, 9 May 2014 11:11:49 +0000 (14:11 +0300)]
mac80211: Provide ieee80211_beacon_get_template API

Add a new API ieee80211_beacon_get_template, which doesn't
affect DTIM counter and should be used if the device generates beacon
frames, and new beacon template is needed. In addition set the offsets
to TIM IE for MESH interface.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: Support multiple CSA counters
Andrei Otcheretianski [Fri, 9 May 2014 11:11:47 +0000 (14:11 +0300)]
mac80211: Support multiple CSA counters

Support up to IEEE80211_MAX_CSA_COUNTERS_NUM csa counters.
This is defined to be 2 now, to support both CSA and eCSA
counters.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agocfg80211: Support multiple CSA counters
Andrei Otcheretianski [Fri, 9 May 2014 11:11:46 +0000 (14:11 +0300)]
cfg80211: Support multiple CSA counters

Change the type of NL80211_ATTR_CSA_C_OFF_BEACON and
NL80211_ATTR_CSA_C_OFF_PRESP to be NLA_BINARY which allows
userspace to use beacons and probe responses with
multiple CSA counters.
This isn't breaking the API since userspace can
continue to use nla_put_u16 for this attributes, which
is equivalent to a single element u16 array.
In addition advertise max number of supported CSA counters.
This is needed when using CSA and eCSA IEs together.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: Update CSA counters in mgmt frames
Andrei Otcheretianski [Fri, 9 May 2014 11:11:45 +0000 (14:11 +0300)]
mac80211: Update CSA counters in mgmt frames

Track current csa counter value and use it
to update mgmt frames at the provided offsets.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agocfg80211: Add API to update CSA counters in mgmt frames
Andrei Otcheretianski [Fri, 9 May 2014 11:11:44 +0000 (14:11 +0300)]
cfg80211: Add API to update CSA counters in mgmt frames

Add NL80211_ATTR_CSA_C_OFFSETS_TX which holds an array
of offsets to the CSA counters which should be updated
when sending a management frames with NL80211_CMD_FRAME.

This API should be used by the drivers that wish to keep the
CSA counter updated in probe responses, but do not implement
probe response offloading and so, do not use
ieee80211_proberesp_get function.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agocfg80211: pass the actual iftype when calling cfg80211_chandef_dfs_required()
Luciano Coelho [Thu, 15 May 2014 10:05:39 +0000 (13:05 +0300)]
cfg80211: pass the actual iftype when calling cfg80211_chandef_dfs_required()

There is no need to pass NL80211_IFTYPE_UNSPECIFIED when calling
cfg80211_chandef_dfs_required() since we always already have the
interface type.  So, pass the actual interface type instead.

Additionally, have cfg80211_chandef_dfs_required() WARN if the passed
interface type is NL80211_IFTYPE_UNSPECIFIED, so we can detect
problems more easily.

Tested-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Reported-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoiwlwifi: mvm: add uapsd_disable module parameter
Matt Chen [Thu, 24 Apr 2014 10:43:18 +0000 (18:43 +0800)]
iwlwifi: mvm: add uapsd_disable module parameter

Some APs (e.g. TP-LINK TL-WA801N) are disabling aggregation (downlink
to station) when U-APSD is enabled, resulting in low throughput.
Add a module parameter to allow disabling U-APSD support in the driver.

Also re-enable U-APSD for -9 firmware since the firmare issues were
fixed in this release.

There are devices that won't support U-APSD even with newer
firmware, so bring the TLV flag back to detect those.

Signed-off-by: Matt Chen <matt.chen@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agocfg80211: fix start_radar_detection issue
Janusz Dziedzic [Wed, 14 May 2014 11:25:04 +0000 (13:25 +0200)]
cfg80211: fix start_radar_detection issue

After patch:
cfg80211/mac80211: refactor cfg80211_chandef_dfs_required()

start_radar_detection always fail with -EINVAL.

Acked-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoiwlwifi: allow dynamic configuration of internal memory
Eran Harary [Sun, 11 May 2014 05:11:34 +0000 (08:11 +0300)]
iwlwifi: allow dynamic configuration of internal memory

New transport need to configure internal memory based on
the data in the (enlarged) alive notification from the
firmware. Add a transport API for this.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agorsi: Changed the return value to enable BA set-up
Jahnavi Meher [Mon, 12 May 2014 10:17:40 +0000 (15:47 +0530)]
rsi: Changed the return value to enable BA set-up

Signed-off-by: Jahnavi Meher <jahnavi.meher@redpinesignals.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: determine chanspec from struct cfg80211_chan_def info
Arend van Spriel [Mon, 12 May 2014 08:47:39 +0000 (10:47 +0200)]
brcmfmac: determine chanspec from struct cfg80211_chan_def info

The struct cfg80211_chan_def contains additional info to derive the
bandwidth and side-band information of the chanspec. This patch adds
chandef_to_chanspec() function used in IBSS join and starting AP
operation.

Reviewed-by: Franky Lin <frankyl@broadcom.com>
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: handle 80MHz chanspecs in construct_reg_info() function
Arend van Spriel [Mon, 12 May 2014 08:47:38 +0000 (10:47 +0200)]
brcmfmac: handle 80MHz chanspecs in construct_reg_info() function

The device is queried about the usability of channels, but it did not
take 80MHz channels into consideration. This patch adds processing those
chanspecs and clear the NO_80MHZ flag for those control/primary channels.

Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.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: get rid of brcmf_cfg80211_set_channel() function
Arend van Spriel [Mon, 12 May 2014 08:47:37 +0000 (10:47 +0200)]
brcmfmac: get rid of brcmf_cfg80211_set_channel() function

The function does not provide any additional functionality and is
used only once so just get rid of it.

Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.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: enable 80Mhz in 5G custom regulatory rules
Arend van Spriel [Mon, 12 May 2014 08:47:36 +0000 (10:47 +0200)]
brcmfmac: enable 80Mhz in 5G custom regulatory rules

By default allow 80Mhz in custom regulatory rules of the 5G band so
the channels will not be flagged with N0_80MHZ.

Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.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>