cascardo/linux.git
9 years agoath10k: support get/set antenna configurations.
Ben Greear [Fri, 16 May 2014 14:15:38 +0000 (17:15 +0300)]
ath10k: support get/set antenna configurations.

Verified that target's tx/rx chain register is set appropriately,
and that the tx rate goes down as number of chains
decrease, but I did not actually try to verify antenna
ceased to transmit when disabled.

kvalo: move ar->supp_*_chainmask initialisation to ath10k_mac_register()

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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

9 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>
9 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>
9 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>
9 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>
9 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>
9 years agoBluetooth: Update smp_confirm to return a response code
Johan Hedberg [Tue, 20 May 2014 06:45:52 +0000 (09:45 +0300)]
Bluetooth: Update smp_confirm to return a response code

Now that smp_confirm() is called "inline" we can have it return a
response code and have the sending of it be done in the shared place for
command handlers. One exception is when we're entering smp.c from mgmt.c
when user space responds to authentication, in which case we still need
our own code to call smp_failure().

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: Update smp_random to return a response code
Johan Hedberg [Tue, 20 May 2014 06:45:51 +0000 (09:45 +0300)]
Bluetooth: Update smp_random to return a response code

Since we're now calling smp_random() "inline" we can have it directly
return a response code and have the shared command handler send the
response.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: Rename smp->smp_flags to smp->flags
Johan Hedberg [Tue, 20 May 2014 06:45:50 +0000 (09:45 +0300)]
Bluetooth: Rename smp->smp_flags to smp->flags

There's no reason to have "smp" in this variable name since it is
already part of the SMP struct which provides sufficient context.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: Remove unnecessary work structs from SMP code
Johan Hedberg [Tue, 20 May 2014 06:45:49 +0000 (09:45 +0300)]
Bluetooth: Remove unnecessary work structs from SMP code

When the SMP code was initially created (mid-2011) parts of the
Bluetooth subsystem were still not converted to use workqueues. This
meant that the crypto calls, which could sleep, couldn't be called
directly. Because of this the "confirm" and "random" work structs were
introduced.

These days the entire Bluetooth subsystem runs through workqueues which
makes these structs unnecessary. This patch removes them and converts
the calls to queue them to use direct function calls instead.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: Fix setting initial local auth_req value
Johan Hedberg [Tue, 20 May 2014 06:45:48 +0000 (09:45 +0300)]
Bluetooth: Fix setting initial local auth_req value

There is no reason to have the initial local value conditional to
whether the remote value has bonding set or not. We can either way start
off with the value we received.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: Make SMP context private to smp.c
Johan Hedberg [Tue, 20 May 2014 06:45:47 +0000 (09:45 +0300)]
Bluetooth: Make SMP context private to smp.c

There are no users of the smp_chan struct outside of smp.c so move it
away from smp.h. The addition of the l2cap.h include to hci_core.c,
hci_conn.c and mgmt.c is something that should have been there already
previously to avoid warnings of undeclared struct l2cap_conn, but the
compiler warning was apparently shadowed away by the mention of
l2cap_conn in the struct smp_chan definition.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth...
John W. Linville [Mon, 19 May 2014 20:34:27 +0000 (16:34 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/bluetooth/bluetooth

9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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./linux/kernel/git/iwlwifi/iwlwifi-next

9 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

9 years agoBluetooth: Add missing msecs to jiffies conversion
Andrzej Kaczmarek [Fri, 16 May 2014 14:48:57 +0000 (16:48 +0200)]
Bluetooth: Add missing msecs to jiffies conversion

conn_info_age value is calculated in ms, so need to be converted to
jiffies.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoath10k: fix pmf for action frames
Marek Kwaczynski [Wed, 14 May 2014 13:56:17 +0000 (16:56 +0300)]
ath10k: fix pmf for action frames

Fix sending and receiveing protected managment frames.
Lack of protected flag for received protected action frames
causes report these frames as unprotected robust action frames.
If the driver in AP mode sent frame with protected flag and
CCMP header using IEEE80211_KEY_FLAG_SW_MGMT_TX flag,
the FW encrypted frames once again. From user side all
received SA Query Requests and Responses were skipped and
all protected action frames were sent as malformed packets.

Signed-off-by: Marek Kwaczynski <marek.kwaczynski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: get rid of pci_assign_resource() call from pci_probe
Bartosz Markowski [Wed, 14 May 2014 13:56:17 +0000 (16:56 +0300)]
ath10k: get rid of pci_assign_resource() call from pci_probe

On ARM-based (MSM mach), the pci_assign_resource() is passing
some invalid pointers and leading to L2 cache errors,
what prevents the PCI communication completly.

So far I have not found this funtion to be directly called by
any other wifi driver and did not found this assigning needed
on any other platform. So removing it completely.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: enable early device dumps
Michal Kazior [Wed, 14 May 2014 13:56:16 +0000 (16:56 +0300)]
ath10k: enable early device dumps

This can be useful for early initialization
debugging, i.e. ROM crashes.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: retry warm reset a few times
Michal Kazior [Wed, 14 May 2014 13:56:16 +0000 (16:56 +0300)]
ath10k: retry warm reset a few times

Sometimes warm reset works upon retry. It might be
related to imperfect warm reset routine, but for
now let's just do the retries.

This should improve the reliability of some chips
that hang/crash with cold reset which is used as a
last resort if warm reset fails.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: improve warm reset reliability
Michal Kazior [Wed, 14 May 2014 13:56:16 +0000 (16:56 +0300)]
ath10k: improve warm reset reliability

Warm reset is now able to recover after device
crashes which required a cold reset before.

This should greatly reduce chances of getting data
bus errors or host system freezes due to buggy
cold reset on some chips.

kvalo: use ath10k_pci_soc_*()

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix spelling mistake in comments
Ben Greear [Wed, 14 May 2014 13:56:14 +0000 (16:56 +0300)]
ath10k: fix spelling mistake in comments

Simple typo fix.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoBluetooth: Add support for max_tx_power in Get Conn Info
Andrzej Kaczmarek [Wed, 14 May 2014 11:43:06 +0000 (13:43 +0200)]
Bluetooth: Add support for max_tx_power in Get Conn Info

This patch adds support for max_tx_power in Get Connection Information
request. Value is read only once for given connection and then always
returned in response as parameter.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: Store max TX power level for connection
Andrzej Kaczmarek [Wed, 14 May 2014 11:43:05 +0000 (13:43 +0200)]
Bluetooth: Store max TX power level for connection

This patch adds support to store local maximum TX power level for
connection when reply for HCI_Read_Transmit_Power_Level is received.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: Avoid polling TX power for LE links
Andrzej Kaczmarek [Wed, 14 May 2014 11:43:04 +0000 (13:43 +0200)]
Bluetooth: Avoid polling TX power for LE links

TX power for LE links is immutable thus we do not need to query for it
if already have value.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: Add support to get connection information
Andrzej Kaczmarek [Wed, 14 May 2014 11:43:03 +0000 (13:43 +0200)]
Bluetooth: Add support to get connection information

This patch adds support for Get Connection Information mgmt command
which can be used to query for information about connection, i.e. RSSI
and local TX power level.

In general values cached in hci_conn are returned as long as they are
considered valid, i.e. do not exceed age limit set in hdev. This limit
is calculated as random value between min/max values to avoid client
trying to guess when to poll for updated information.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: Add conn info lifetime parameters to debugfs
Andrzej Kaczmarek [Wed, 14 May 2014 11:43:02 +0000 (13:43 +0200)]
Bluetooth: Add conn info lifetime parameters to debugfs

This patch adds conn_info_min_age and conn_info_max_age parameters to
debugfs which determine lifetime of connection information. Actual
lifetime will be random value between min and max age.

Default values for min and max age are 1000ms and 3000ms respectively.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 years agoath9k_htc: Stop ANI before doing hw_reset
Rajkumar Manoharan [Wed, 14 May 2014 09:09:21 +0000 (14:39 +0530)]
ath9k_htc: Stop ANI before doing hw_reset

During remain on channel request, ANI worker thread is not stopped
before doing hw reset. This is causing kernel crash in
hw_per_calibration. This change ensures that ANI is stopped before
doing chip reset and it will be rescheduled later when the chip is
configured back to home channel and having valid bss.

Reported-by: David Herrmann <dh.herrmann@gmail.com>
Tested-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
John W. Linville [Wed, 14 May 2014 19:39:45 +0000 (15:39 -0400)]
Merge git://git./linux/kernel/git/jberg/mac80211

9 years agoBluetooth: Fix L2CAP LE debugfs entries permissions
Samuel Ortiz [Wed, 14 May 2014 15:53:35 +0000 (17:53 +0200)]
Bluetooth: Fix L2CAP LE debugfs entries permissions

0466 was probably meant to be 0644, there's no reason why everyone
except root could write there.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org
9 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>
9 years agomac80211: fix on-channel remain-on-channel
Johannes Berg [Wed, 14 May 2014 13:34:41 +0000 (15:34 +0200)]
mac80211: fix on-channel remain-on-channel

Jouni reported that if a remain-on-channel was active on the
same channel as the current operating channel, then the ROC
would start, but any frames transmitted using mgmt-tx on the
same channel would get delayed until after the ROC.

The reason for this is that the ROC starts, but doesn't have
any handling for "remain on the same channel", so it stops
the interface queues. The later mgmt-tx then puts the frame
on the interface queues (since it's on the current operating
channel) and thus they get delayed until after the ROC.

To fix this, add some logic to handle remaining on the same
channel specially and not stop the queues etc. in this case.
This not only fixes the bug but also improves behaviour in
this case as data frames etc. can continue to flow.

Cc: stable@vger.kernel.org
Reported-by: Jouni Malinen <j@w1.fi>
Tested-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoath10k: fix handling of wierd MSDU chaining cases
Michal Kazior [Wed, 14 May 2014 13:23:31 +0000 (16:23 +0300)]
ath10k: fix handling of wierd MSDU chaining cases

Apparently firmware can sometimes report a
sequence with the first rx descriptor saying it's
not the last MSDU. In that case msdu_chaining
value could be overwritten saying it's not a
chained MSDU. This in turn led to skb_push panic
as the frame could be treated as an A-MSDU instead
of a chained MSDU.

Reported-By: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix htt rx ring clean up
Michal Kazior [Wed, 14 May 2014 13:23:31 +0000 (16:23 +0300)]
ath10k: fix htt rx ring clean up

msdu_payId was read before txrx tasklet was killed
so it was possible to end up using an invalid
sk_buff pointer leading to a panic.

Make sure to sanitize rx ring sk_buff pointers and
make the clean up go through all possible entries
and not rely on coherent-DMA mapped u32 index
which could be (in theory) corrupted by the device
as well.

Reported-By: Avery Pennarun <apenwarr@gmail.com>
Reported-By: Ben Greear <greearb@candelatech.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoMerge remote-tracking branch 'wireless-next/master' into ath-next
Kalle Valo [Wed, 14 May 2014 13:20:08 +0000 (16:20 +0300)]
Merge remote-tracking branch 'wireless-next/master' into ath-next

9 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>
9 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>
9 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>