pandora-kernel.git
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./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./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./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./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>
10 years agobrcmfmac: provide VHT capability information to user-space
Arend van Spriel [Mon, 12 May 2014 08:47:35 +0000 (10:47 +0200)]
brcmfmac: provide VHT capability information to user-space

Although brcmfmac support several 11ac devices it did not advertise
VHT related information to cfg80211.

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 agobrcm80211: extend channel conversion functions for 80MHz support
Arend van Spriel [Mon, 12 May 2014 08:47:34 +0000 (10:47 +0200)]
brcm80211: extend channel conversion functions for 80MHz support

The channel values used by firmware is handled using conversion functions
depending on the type of chip. These functions were already in place but
lacked proper support for 80MHz channel definitions. This patch adds the
support for that.

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: remove usage of cfg80211_get_chandef_type()
Arend van Spriel [Mon, 12 May 2014 08:47:33 +0000 (10:47 +0200)]
brcmfmac: remove usage of cfg80211_get_chandef_type()

In the .start_ap callback cfg80211_get_chandef_type() was used to
provide debug log info. However, this causes a warning when the
chandef contains VHT channel with 80MHz bandwidth. Avoid the warning
by just printing the channel and bandwidth instead.

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: Fix reconnect failure after beacon timeout
Daniel Kim [Mon, 12 May 2014 08:47:32 +0000 (10:47 +0200)]
brcmfmac: Fix reconnect failure after beacon timeout

The DISASSOC command needs to be sent to firmware when a connection
loss is detected by firmware (e.g., beacon timeout). Otherwise the
next connect request fails due to a lingering LINK(down) event from
firmware. This patch resolves the issue by using brcmf_link_down()
handler, instead of the incomplete duplicated codes.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Daniel Kim <dekim@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: enhance nvram processing
Arend van Spriel [Mon, 12 May 2014 08:47:31 +0000 (10:47 +0200)]
brcmfmac: enhance nvram processing

The driver serializes the nvram firmware file before sending it
to the device. This patch enhances this to assure serialized data
is properly formatted and provide warnings on syntax failures.

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: Make FWS queueing configurable.
Hante Meuleman [Mon, 12 May 2014 08:47:30 +0000 (10:47 +0200)]
brcmfmac: Make FWS queueing configurable.

FWS is always queuing frames and using a worker for de-queueing,
this is not always efficient for all bus layer. For example SDIO
has an internal queue and worker making the queueing of FWS
unnecessary. Make it possible to bypass the worker if fws mode
is none using a bus interface configuration. For USB bus layer
this configuration is set true to have fws provide queueing
regardless the fws mode.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: Move handling 802.1x frames to dhd_linux.
Hante Meuleman [Mon, 12 May 2014 08:47:29 +0000 (10:47 +0200)]
brcmfmac: Move handling 802.1x frames to dhd_linux.

Tracking and handling of 802.1x frames is done in two modules, it
is more logical and clear to move this to dhd_linux module.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: Move out hdrpull from tx_finalize.
Hante Meuleman [Mon, 12 May 2014 08:47:28 +0000 (10:47 +0200)]
brcmfmac: Move out hdrpull from tx_finalize.

In tx_finalize the hdrpull is performed. For the new protocol
msgbuf this is complex, because it does not use protocol headers
in front of payload anymore and therefor can not determine interface
index in the hdr pulll operation. Move out the hdrpull operation
from tx_finalize to make msgbuf implementation easier.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: Report the support of firmware roaming
Daniel Kim [Mon, 12 May 2014 08:47:27 +0000 (10:47 +0200)]
brcmfmac: Report the support of firmware roaming

Currently firmware roaming support is not reported to cfg80211.
This patch reports the support of firmware based roaming when
it is enabled.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Daniel Kim <dekim@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: Give priority to 5GHz band in selecting target BSS
Daniel Kim [Mon, 12 May 2014 08:47:26 +0000 (10:47 +0200)]
brcmfmac: Give priority to 5GHz band in selecting target BSS

When a BSS provides both 2.4GHz and 5GHz bands, in many cases it
makes sense to choose 5GHz. Typically a 5GHz channel is less crowded
and has less interference and therefore its performance will be
better than a crowded 2.4 GHz channel. This patch configures
'join_pref' to induce firmware to preferably select 5GHz BSS.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Daniel Kim <dekim@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: use ath9k_cmn_debug_phy_err
Oleksij Rempel [Sun, 11 May 2014 08:04:40 +0000 (10:04 +0200)]
ath9k_htc: use ath9k_cmn_debug_phy_err

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: move phy_err to ath9k_cmn_debug_phy_err
Oleksij Rempel [Sun, 11 May 2014 08:04:39 +0000 (10:04 +0200)]
ath9k: move phy_err to ath9k_cmn_debug_phy_err

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: use ath9k_cmn_debug_recv
Oleksij Rempel [Sun, 11 May 2014 08:04:38 +0000 (10:04 +0200)]
ath9k_htc: use ath9k_cmn_debug_recv

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: move recv to ath9k_cmn_debug_recv
Oleksij Rempel [Sun, 11 May 2014 08:04:37 +0000 (10:04 +0200)]
ath9k: move recv to ath9k_cmn_debug_recv

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k & ath9k_htc: move ath_rx_stats to cmn
Oleksij Rempel [Sun, 11 May 2014 08:04:36 +0000 (10:04 +0200)]
ath9k & ath9k_htc: move ath_rx_stats to cmn

and use it. This move need changes in both drivers.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: reorder or remove some includes
Oleksij Rempel [Sun, 11 May 2014 08:04:35 +0000 (10:04 +0200)]
ath9k: reorder or remove some includes

to fix compile errors

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: use ath9k_cmn_debug_base_eeprom
Oleksij Rempel [Sun, 11 May 2014 08:04:34 +0000 (10:04 +0200)]
ath9k_htc: use ath9k_cmn_debug_base_eeprom

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: move base_eeprom debug code to ath9k_cmn_debug_base_eeprom
Oleksij Rempel [Sun, 11 May 2014 08:04:33 +0000 (10:04 +0200)]
ath9k: move base_eeprom debug code to ath9k_cmn_debug_base_eeprom

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: use ath9k_cmn_debug_modal_eeprom
Oleksij Rempel [Sun, 11 May 2014 08:04:32 +0000 (10:04 +0200)]
ath9k_htc: use ath9k_cmn_debug_modal_eeprom

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k-common: create common-debug and move modal_eeprom to cmn
Oleksij Rempel [Sun, 11 May 2014 08:04:31 +0000 (10:04 +0200)]
ath9k-common: create common-debug and move modal_eeprom to cmn

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: drop SSB dependency
Rafał Miłecki [Sat, 10 May 2014 17:14:09 +0000 (19:14 +0200)]
b43: drop SSB dependency

This adds choice submenu "Supported bus types" as two simple bool
configs would allow user to compile b43 without any bus support
(prety useless).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>