GitHub/moto-9609/android_kernel_motorola_exynos9610.git
7 years agoiwlwifi: mvm: change open and close criteria of a BA session
Gregory Greenman [Tue, 15 Aug 2017 09:27:01 +0000 (12:27 +0300)]
iwlwifi: mvm: change open and close criteria of a BA session

Tx BA session should be started according to the current throughput
without any dependence on the internal rate scaling state. The criteria
for opening a BA session will be 10 frames per second.

Sending frequent del BAs can cause inter-op issues with some APs. We'll
not close a BA session until we receive an explicit del BA from the
peer.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: update channel flags parser
Luca Coelho [Wed, 16 Aug 2017 07:46:52 +0000 (10:46 +0300)]
iwlwifi: update channel flags parser

There are some new flags in the channel flags that we don't know
about.  Also, the "WIDE" flag is very confusing, because it actually
means 20MHz bandwidth, which is not very wide.

Add the new flags and rename the confusing one.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: pci: add new PCI ID for 7265D
Luca Coelho [Wed, 16 Aug 2017 05:47:38 +0000 (08:47 +0300)]
iwlwifi: pci: add new PCI ID for 7265D

We have a new PCI subsystem ID for 7265D.  Add it to the list.

Cc: stable@vger.kernel.org
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: distinguish different RF modules in A000 devices
Tzipi Peres [Tue, 25 Jul 2017 10:04:46 +0000 (13:04 +0300)]
iwlwifi: distinguish different RF modules in A000 devices

Newer versions of A000 devices come with two diffenent RF modules.
The PCI_ID, the subsystem ID and the RF ID are identical in these two cases,
so we need to differentiate them by using the CSR_HW_RF_ID register-
in order to load the appropriate firmware.

Signed-off-by: Tzipi Peres <tzipi.peres@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: Fix channel switch in case of count <= 1
Ilan Peer [Tue, 8 Aug 2017 11:56:58 +0000 (14:56 +0300)]
iwlwifi: mvm: Fix channel switch in case of count <= 1

The code did not consider the case that the channel switch counter
is <= 1, which would result with an inaccurate calculation of the
time event apply time.

As the specification states that in case of counter == 0 the switch
occurs at any time after the reception the frame, and for counter == 1
the switch would happens before the next TBTT, schedule the time
event immediately.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: Demote messages about fw flags size to info
João Paulo Rechi Vita [Thu, 3 Aug 2017 14:47:28 +0000 (07:47 -0700)]
iwlwifi: Demote messages about fw flags size to info

These messages are not reporting a real error, just the fact that the
firmware knows about more flags than the driver.

Currently these messages are presented to the user during boot if there
is no bootsplash covering the console, even when booting the kernel with
"quiet".

Demoting it to the warn level helps having a clean boot process.

Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: move BT_MBOX_PRINT macro to common header
Luca Coelho [Sun, 6 Aug 2017 08:06:44 +0000 (11:06 +0300)]
iwlwifi: move BT_MBOX_PRINT macro to common header

Move the BT_MBOX_PRINT() macro from mvm/debugfs.c to fw/api/coex.h so
it can be reused and remove duplicate definition of BT_MBOX_MSG(),
keeping only the one already in coex.h.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: don't send BAR on flushed frames
Emmanuel Grumbach [Sun, 6 Aug 2017 10:19:05 +0000 (13:19 +0300)]
iwlwifi: mvm: don't send BAR on flushed frames

When we flush a queue, the packets will have a 'failed'
status but we shouldn't send a BAR. This check was missing.
Because of that, when we got an ampdu_action with
IEEE80211_AMPDU_TX_STOP_FLUSH, we started the following
ping pong with the firmware:

1) Set the station as 'draining'
2) Get a failed Tx status (DRAINED)
3) Send a BAR because of the failed Tx status

(loop of 2 and 3)

This loop wasn't endless since the BAR isn't sent on a
queue that would trigger a "nested" BAR.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: remove session protection to allow channel switch
Avraham Stern [Wed, 2 Aug 2017 09:13:20 +0000 (12:13 +0300)]
iwlwifi: mvm: remove session protection to allow channel switch

If a time event is already scheduled when trying to schedule one for
channel switch, the code assumes the channel switch is already
scheduled and no further action is required.
However, it is possible that the scheduled time event is actually
for session protection (e.g. when the first beacon after association
contains the CSA IE). In this case the channel switch will not be
scheduled which will finally lead to disconnection.

Fix this by removing the old time event and schduling a new one for
the channel switch.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: update the firmware API in TX
Emmanuel Grumbach [Wed, 2 Aug 2017 06:29:33 +0000 (09:29 +0300)]
iwlwifi: mvm: update the firmware API in TX

The firmware team is now re-using a bit that hasn't been
used for a few generations. Re-use for TX_ON_AIR drop.
This bit will be set by the firmware to indicate that
a frame in an A-MPDU was dropped but not because of the
already mapped reasons.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: use mvmsta consistently in rs.c
Luca Coelho [Tue, 1 Aug 2017 06:01:34 +0000 (09:01 +0300)]
iwlwifi: mvm: use mvmsta consistently in rs.c

We use mvmsta for the sta->drv_priv in mvm, but in rs.c we have a
bunch of instances using sta_priv, which is probably due to it being
copied from dvm.  Change all occurrences to mvmsta for consistency
with the rest of the driver

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: group all dummy SAR function declarations together
Luca Coelho [Wed, 26 Jul 2017 12:20:18 +0000 (15:20 +0300)]
iwlwifi: mvm: group all dummy SAR function declarations together

We have some of the SAR dummy functions when ACPI is not set declared
in mvm.h and some declared in fw.c.  Group them all together in fw.c
for consistency and to avoid static/non-static issues.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: include more debug data when we get an unexpected baid
Emmanuel Grumbach [Thu, 27 Jul 2017 06:45:10 +0000 (09:45 +0300)]
iwlwifi: mvm: include more debug data when we get an unexpected baid

When we get a valid baid in a received frame, we need to
check that we are aware of this baid. If not, we check
that the OLD_SN bit set. If that's not the case, we issue
a WARNING. Print more data when that happens.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: add command name for FRAME_RELEASE
Emmanuel Grumbach [Thu, 27 Jul 2017 06:40:16 +0000 (09:40 +0300)]
iwlwifi: mvm: add command name for FRAME_RELEASE

This name was missing in the list.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: pcie: support short Tx queues for A000 device family
Emmanuel Grumbach [Sun, 16 Jul 2017 09:28:05 +0000 (12:28 +0300)]
iwlwifi: pcie: support short Tx queues for A000 device family

This allows to modify TFD_TX_CMD_SLOTS to a power of 2
which is smaller than 256.
Note that we still need to set values to wrap at 256
into the scheduler's write pointer, but all the rest of
the code can use shorter transmit queues.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: support new Coex firmware API
Emmanuel Grumbach [Sun, 23 Jul 2017 10:59:47 +0000 (13:59 +0300)]
iwlwifi: mvm: support new Coex firmware API

The firmware now adds more information about time sharing
with the Bluetooth core.
Adapt the API structures and add the new fields in the
debugfs hooks.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: call iwl_remove_notification from iwl_wait_notification
Luca Coelho [Mon, 24 Jul 2017 13:04:47 +0000 (16:04 +0300)]
iwlwifi: call iwl_remove_notification from iwl_wait_notification

The iwl_wait_notification() function removes the wait entry from the
list.  To make it clearer that it's doing the same thing as
iwl_remove_notification(), call the latter instead of having duplicate
code.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: consider RFKILL during INIT as success
Luca Coelho [Mon, 24 Jul 2017 11:47:52 +0000 (14:47 +0300)]
iwlwifi: mvm: consider RFKILL during INIT as success

There's no need to differentiate an INIT that ended early because of
RFKILL from one that succeded.  Additionally, if INIT fails later,
during calibration, due to RFKILL, we can just return success and
continue as if we were already in RFKILL to start with.

Remove this unnecessary differentiation and do some other small
clean-ups while at it.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: remove the corunning support
Emmanuel Grumbach [Sun, 16 Jul 2017 13:22:08 +0000 (16:22 +0300)]
iwlwifi: mvm: remove the corunning support

The corunning block was supposed to help in coex scenarios.
It required the driver to configure the firmware based on
the coupling between the two antennas of the devices.
This was never in use and the configuration sent by the
driver has always been blank.
Remove all that code.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agorsi: security enhancements for AP mode
Prameela Rani Garnepudi [Wed, 16 Aug 2017 13:13:18 +0000 (18:43 +0530)]
rsi: security enhancements for AP mode

Station id should be set in load key frame configured to device.
For WEP mode, key is configured once from mac80211. This key is
saved and configured to device every time a station is connected.

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: aggregation parameters frame for AP mode
Prameela Rani Garnepudi [Wed, 16 Aug 2017 13:13:17 +0000 (18:43 +0530)]
rsi: aggregation parameters frame for AP mode

TX command frame ampdu aggregation parameters is updated to
include sta_id for AP mode.

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: update tx auto rate command frame for AP mode
Prameela Rani Garnepudi [Wed, 16 Aug 2017 13:13:16 +0000 (18:43 +0530)]
rsi: update tx auto rate command frame for AP mode

Auto rate frame is sent to firmware when a new station is
connected. Station id and station's ht capabilities are updated
in auto rate command frame.

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: use common descriptor for auto rate frame
Prameela Rani Garnepudi [Wed, 16 Aug 2017 13:13:15 +0000 (18:43 +0530)]
rsi: use common descriptor for auto rate frame

TX command frame auto rate request is modified to use common
descriptor struture.

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: data and managemet path changes for AP mode
Prameela Rani Garnepudi [Wed, 16 Aug 2017 13:13:14 +0000 (18:43 +0530)]
rsi: data and managemet path changes for AP mode

Station id needs to be get for data and management frames
to fill in the descruptor for AP mode. Few other changes
related to AP mode are covered here.

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: handle station disconnection in AP mode
Prameela Rani Garnepudi [Wed, 16 Aug 2017 13:13:13 +0000 (18:43 +0530)]
rsi: handle station disconnection in AP mode

When sta_remove of mac80211 is called, driver iterates through
list of existing stations to get the station id. Then peer notify
is prepared and send to firmare.

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: handle station connection in AP mode
Prameela Rani Garnepudi [Wed, 16 Aug 2017 13:13:12 +0000 (18:43 +0530)]
rsi: handle station connection in AP mode

Station structures are maintained in driver with required
fields. When mac80211 callback sta_add is called, driver
iterates through list of connected stations to check available
index and assigns station id which is important for further
communication to that station. Then peer notify frame is send
to firmware to inform the firmware about new station connection.

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: add beacon changes for AP mode
Prameela Rani Garnepudi [Wed, 16 Aug 2017 13:13:11 +0000 (18:43 +0530)]
rsi: add beacon changes for AP mode

Mac80211 config parameter BEACON_ENABLE is handled. When VAP
capabilities frame with AP mode is configured to firmware, beacon
events start coming to host at each PreTBTT. At this time, beacon
is taken from mac80211, descriptor is prepared and send to firmware.

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: remove interface changes for AP mode
Prameela Rani Garnepudi [Wed, 16 Aug 2017 13:13:10 +0000 (18:43 +0530)]
rsi: remove interface changes for AP mode

remove_interface callback of mac80211 is handled for AP mode.
Same is notified to firmware through vap_capabilities frame
with VAP status VAP_DELETE.

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: add interface changes for ap mode
Prameela Rani Garnepudi [Wed, 16 Aug 2017 13:13:09 +0000 (18:43 +0530)]
rsi: add interface changes for ap mode

AP mode is handled in add_interface callback of mac80211.
Also for AP mode, sending rx filter frame to disallow beacons
to host is added. Station structures are initialized to NULL.

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: advertise ap mode support
Prameela Rani Garnepudi [Wed, 16 Aug 2017 13:13:08 +0000 (18:43 +0530)]
rsi: advertise ap mode support

AP mode support is advertised to cfg80211. Necessary wiphy
parameters are initialized.

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agoqtnfmac: modify tx reclaim locking
Sergey Matyukevich [Tue, 15 Aug 2017 13:06:38 +0000 (16:06 +0300)]
qtnfmac: modify tx reclaim locking

Perform additional reclaim from qtnf_pcie_data_tx. Lock tx_lock serves only
reclaim synchronization purposes. Rename it accordingly and improve
granularity moving this lock to qtnf_pcie_data_tx_reclaim.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agoqtnfmac: introduce counter for Rx underflow events
Sergey Matyukevich [Tue, 15 Aug 2017 13:06:37 +0000 (16:06 +0300)]
qtnfmac: introduce counter for Rx underflow events

Introduce counter for Rx underflow events. Export this counter via debugfs.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agoqtnfmac: switch to kernel circ_buf implementation
Sergey Matyukevich [Tue, 15 Aug 2017 13:06:36 +0000 (16:06 +0300)]
qtnfmac: switch to kernel circ_buf implementation

Current code for both Rx and Tx queue management is a custom and incomplete
circular buffer implementation. It makes a lot of sense to switch to kernel
built-in circ_buf implementation.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agoqtnfmac: decrease default Tx queue size
Sergey Matyukevich [Tue, 15 Aug 2017 13:06:35 +0000 (16:06 +0300)]
qtnfmac: decrease default Tx queue size

Avoid extra buffering in driver by default. Use max hardware Tx queue size.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agoqtnfmac: skb2rbd_attach cleanup
Sergey Matyukevich [Tue, 15 Aug 2017 13:06:34 +0000 (16:06 +0300)]
qtnfmac: skb2rbd_attach cleanup

Update PCIE_HDP_TX_HOST_Q_WR_PTR register in skb2rbd_attach as a part of
procedure of passing new Rx buffer to hardware. Sync up all the the
qtnf_rx_bd descriptor updates before passing Rx buffer to hardware.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agoqtnfmac: use __netdev_alloc_skb_ip_align
Sergey Matyukevich [Tue, 15 Aug 2017 13:06:33 +0000 (16:06 +0300)]
qtnfmac: use __netdev_alloc_skb_ip_align

Replace __dev_alloc_skb and explicit NET_IP_ALIGN alignment by built-in
__netdev_alloc_skb_ip_align function.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agoqtnfmac: switch to napi_gro_receive
Sergey Matyukevich [Tue, 15 Aug 2017 13:06:32 +0000 (16:06 +0300)]
qtnfmac: switch to napi_gro_receive

Use napi_gro_receive() rather than netif_receive_skb() to improve
performance when GRO is enabled.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agoqtnfmac: remove unused qtnf_rx_frame declaration
Sergey Matyukevich [Tue, 15 Aug 2017 13:06:31 +0000 (16:06 +0300)]
qtnfmac: remove unused qtnf_rx_frame declaration

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agomwifiex: check for NL80211_SCAN_FLAG_RANDOM_ADDR during hidden SSID scan
Ganapathi Bhat [Thu, 10 Aug 2017 12:41:26 +0000 (18:11 +0530)]
mwifiex: check for NL80211_SCAN_FLAG_RANDOM_ADDR during hidden SSID scan

At the end of user scan request, driver will perform an active
scan for hidden SSIDs in passive channels. While doing this,
driver unconditionally adding random_mac in scan command, which
is no expected. It should add random_mac only if scan_request
has NL80211_SCAN_FLAG_RANDOM_ADDR flag set.

Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agomwifiex: do not use random MAC for pre-association scanning
Ganapathi Bhat [Thu, 10 Aug 2017 12:41:25 +0000 (18:11 +0530)]
mwifiex: do not use random MAC for pre-association scanning

Driver should use random MAC address only if the scan is
requested by user(provided NL80211_SCAN_FLAG_RANDOM_ADDR
is set in scan request). It should not be used for a scan
performed before association.

Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agoMerge tag 'iwlwifi-next-for-kalle-2017-08-11' of git://git.kernel.org/pub/scm/linux...
Kalle Valo [Fri, 11 Aug 2017 14:07:40 +0000 (17:07 +0300)]
Merge tag 'iwlwifi-next-for-kalle-2017-08-11' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

Sencond batch of iwlwifi patches for 4.14

* Some more code moved to a new directory;
* Fixes in LED handling;
* Some FW API updates;
* General fixes and cleanups here and there.

7 years agobrcm80211: constify usb_device_id
Arvind Yadav [Fri, 11 Aug 2017 05:23:50 +0000 (10:53 +0530)]
brcm80211: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agomwifiex: uap: enable 11d based on userspace configruation
Xinming Hu [Wed, 9 Aug 2017 02:31:43 +0000 (02:31 +0000)]
mwifiex: uap: enable 11d based on userspace configruation

This patch check whether userspace beacon data include country
ie, if so then download command to enable 11d setup in firmeare
accordingly.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agozd1211rw: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:31:42 +0000 (22:01 +0530)]
zd1211rw: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agozd1201: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:31:24 +0000 (22:01 +0530)]
zd1201: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agortl8192cu: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:31:05 +0000 (22:01 +0530)]
rtl8192cu: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agortl8xxxu: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:30:39 +0000 (22:00 +0530)]
rtl8xxxu: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agortl8187: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:30:13 +0000 (22:00 +0530)]
rtl8187: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agort73usb: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:29:48 +0000 (21:59 +0530)]
rt73usb: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agort2800usb: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:29:15 +0000 (21:59 +0530)]
rt2800usb: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agort2500usb: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:29:14 +0000 (21:59 +0530)]
rt2500usb: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agomt7601u: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:28:24 +0000 (21:58 +0530)]
mt7601u: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agomwifiex: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:27:59 +0000 (21:57 +0530)]
mwifiex: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agolibertas_tf: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:27:29 +0000 (21:57 +0530)]
libertas_tf: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agolibertas: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:27:28 +0000 (21:57 +0530)]
libertas: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agop54: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:26:43 +0000 (21:56 +0530)]
p54: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agoorinoco: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:26:28 +0000 (21:56 +0530)]
orinoco: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agoat76c50x: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:25:03 +0000 (21:55 +0530)]
at76c50x: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agocarl9170: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:24:41 +0000 (21:54 +0530)]
carl9170: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agoar5523: constify usb_device_id
Arvind Yadav [Wed, 9 Aug 2017 16:23:42 +0000 (21:53 +0530)]
ar5523: constify usb_device_id

usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agoiwlwifi: mvm: fix the coex firmware API
Emmanuel Grumbach [Sun, 23 Jul 2017 09:53:46 +0000 (12:53 +0300)]
iwlwifi: mvm: fix the coex firmware API

The firmware API defined in the header files didn't match
the structure that are actually passed by the firmware.
The impact could be a decision for MIMO in Tx or Rx in
coex scenarios.

Fixes: 430a3bbafdc7 ("iwlwifi: mvm: BT Coex - new API")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: pcie: free the TSO page when a Tx queue is unmapped on A000 devices
Emmanuel Grumbach [Sun, 16 Jul 2017 09:45:12 +0000 (12:45 +0300)]
iwlwifi: pcie: free the TSO page when a Tx queue is unmapped on A000 devices

When we unmap a non-empty Tx queue, we need to free the
pages that we allocated for the headers in TSO flows.
This code existed for the 9000 device family, but somehow
it got left out when the new Tx path for the A000 devices
was written.

Fixes: 2b0c5946d9ed ("iwlwifi: pcie: introduce a000 TX queues management")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: remove references to unsupported HW
Luca Coelho [Mon, 17 Jul 2017 06:15:34 +0000 (09:15 +0300)]
iwlwifi: remove references to unsupported HW

There are still some references to 3945 and 4965 HW, which were never
supported in iwlwifi.  These references were inherited from a previous
project and are irrelevant here.  Additionally, remove some irrelevant
references to 5100 HW.  Remove all these.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: fix nmi triggering from host
Golan Ben-Ami [Wed, 28 Jun 2017 10:03:58 +0000 (13:03 +0300)]
iwlwifi: fix nmi triggering from host

Although nmi was triggered fine till now, it appears
that the driver didn't write the exact correct values
to the correct addresses for each HW.
Fix the nmi triggering by setting the correct addresses
and values.

Fixes: 4c9706dc2f29 ("iwlwifi: update nmi register")
Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: pcie: don't init a Tx queue with an SSN > size of the queue
Emmanuel Grumbach [Thu, 13 Jul 2017 06:49:32 +0000 (09:49 +0300)]
iwlwifi: pcie: don't init a Tx queue with an SSN > size of the queue

The TVQM tells us the initial write pointer for a queue,
but that write pointer is in WiFi sequence number unit
and not in TFD index unit. Which means that the write
pointer in the TVQM's response can be bigger than the
Tx queue ring size.

Fix that by modulo'ing the write pointer from the TVQM
with the Tx queue size.

Fixes: 66128fa08806 ("iwlwifi: move to TVQM mode")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: add station before allocating a queue
Shaul Triebitz [Mon, 10 Jul 2017 16:58:10 +0000 (19:58 +0300)]
iwlwifi: mvm: add station before allocating a queue

One of the queue config params is the associated station id.
Hence the FW must know about the station prior to the queue allocation.
In a000 devices, allocating a queue without a valid station
results with assert 0x2B00.
In FW restart flow the queues are allocated before
adding the station so first add the station.

Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: don't send CTDP commands via debugfs if not supported
Matt Chen [Fri, 23 Jun 2017 09:50:18 +0000 (17:50 +0800)]
iwlwifi: mvm: don't send CTDP commands via debugfs if not supported

Fix this issue if it is not supported by the firmware.

Fixes: 00f481bd895a ("iwlwifi: mvm: add ctdp operations to debugfs")
Signed-off-by: Matt Chen <matt.chen@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: support new beacon template command
Haim Dreyfuss [Mon, 12 Jun 2017 11:59:02 +0000 (14:59 +0300)]
iwlwifi: mvm: support new beacon template command

Support a new version of the beacon template command. This replaces v8
of the command, which was missing the rate code.  Also, export rate
decision logic to a separate function.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: set the default cTDP budget
Chaya Rachel Ivgi [Sun, 9 Jul 2017 13:35:14 +0000 (16:35 +0300)]
iwlwifi: mvm: set the default cTDP budget

In case there is no value received from BIOS
for cTDP budget, the default should be 2000 mWatt.

Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: move a000 device NVM retrieval to a common place
Shaul Triebitz [Thu, 22 Jun 2017 14:09:08 +0000 (17:09 +0300)]
iwlwifi: mvm: move a000 device NVM retrieval to a common place

Getting the NVM data in a000 devices should be shared
across operation mode.

Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: dump smem configuration when firmware crashes
Golan Ben-Ami [Sun, 25 Jun 2017 14:23:23 +0000 (17:23 +0300)]
iwlwifi: dump smem configuration when firmware crashes

Add the smem configuration to the fw data dump, once
the firmware crashes. This is useful mainly for later
parsing of the smem.

Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: fix a000 RF_ID define
Liad Kaufman [Sun, 2 Jul 2017 07:32:34 +0000 (10:32 +0300)]
iwlwifi: fix a000 RF_ID define

One of the defines has a wrong value.

Fixes: 1afb0ae42174 ("iwlwifi: allow combining different phy images with mac images")
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: add support of FPGA fw
Tzipi Peres [Wed, 14 Jun 2017 07:02:47 +0000 (10:02 +0300)]
iwlwifi: add support of FPGA fw

Load FW according to NIC type,
taking into account simulation, if exists.
This is determined by a prph register.

Signed-off-by: Tzipi Peres <tzipi.peres@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: fix a few instances of misaligned kerneldoc parameters
Luca Coelho [Wed, 28 Jun 2017 11:08:53 +0000 (14:08 +0300)]
iwlwifi: fix a few instances of misaligned kerneldoc parameters

There are a few places where we don't have a space between the * and
the @ in the parameter description.  Also, in one case, the @ had
trailing space before the parameter name.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: change functions that can only return 0 to void
Sharon Dvir [Mon, 12 Jun 2017 08:28:21 +0000 (11:28 +0300)]
iwlwifi: change functions that can only return 0 to void

Change iwl_set_ucode_api_flags(), iwl_set_ucode_capabilities() to be void.
No need to check returned values.
Found by Klocwork.

Signed-off-by: Sharon Dvir <sharon.dvir@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: add debugfs to force CT-kill
Chaya Rachel Ivgi [Tue, 27 Jun 2017 11:13:02 +0000 (14:13 +0300)]
iwlwifi: mvm: add debugfs to force CT-kill

CT-kill is a thermal-based "RF-kill", which disables the NIC
completely if the temperature gets too high, in order to avoid damage.

Add a debugfs entry to simulate high temperatures, in order to test
CT-kill flows in the driver without having to physically heat the
device up.

Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: add const to thermal_cooling_device_ops structure
Bhumika Goyal [Wed, 21 Jun 2017 08:40:42 +0000 (14:10 +0530)]
iwlwifi: mvm: add const to thermal_cooling_device_ops structure

Declare thermal_cooling_device_ops structure as const as it is only passed
as an argument to the function thermal_cooling_device_register and this
argument is of type const. So, declare the structure as const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: use firmware LED command where applicable
Johannes Berg [Wed, 28 Jun 2017 14:19:49 +0000 (16:19 +0200)]
iwlwifi: mvm: use firmware LED command where applicable

On devices starting from 8000 series, the host can no longer toggle
the LED through the CSR_LED_REG register, but must do it via the
firmware instead. Add support for this. Note that this means that
the LED cannot be turned on while the firmware is off, so using an
arbitrary LED trigger may not work as expected.

Fixes: 503ab8c56ca0 ("iwlwifi: Add 8000 HW family support")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agoiwlwifi: mvm: remove useless condition in LED code
Johannes Berg [Thu, 29 Jun 2017 07:14:45 +0000 (09:14 +0200)]
iwlwifi: mvm: remove useless condition in LED code

If the module parameter is set to disable the LED, we leave the
initialization routine before setting the LEDS_INIT_COMPLETE
status bit. Therefore, there's no need to check the parameter
again on exit, just the status check is sufficient.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
7 years agort2x00: Fix MMIC Countermeasures
Michael Skeffington [Mon, 7 Aug 2017 16:47:36 +0000 (12:47 -0400)]
rt2x00: Fix MMIC Countermeasures

Set RX_FLAG_DECRYPTED in case of MMIC failure so that
ieee80211_rx_h_decrypt() doesnt drop the frame before getting to
ieee80211_rx_h_michael_mic_verify().

Signed-off-by: Michael Skeffington <mike@astro.ai>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agortlwifi: constify rate_control_ops structure
Bhumika Goyal [Mon, 7 Aug 2017 05:00:51 +0000 (10:30 +0530)]
rtlwifi: constify rate_control_ops structure

rate_control_ops structure is only passed as an argument to the
function ieee80211_rate_control_{register/unregister}. This argument
is of type const, so declare the structure as const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agowlcore: add const to bin_attribute structure
Bhumika Goyal [Wed, 2 Aug 2017 17:57:13 +0000 (23:27 +0530)]
wlcore: add const to bin_attribute structure

Add const to bin_attribute structure as it is only passed to the
functions sysfs_{remove/create}_bin_file. The corresponding arguments
are of type const, so declare the structure to be const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agobrcmfmac: add setting carrier state ON for successful roaming
Chung-Hsien Hsu [Mon, 7 Aug 2017 08:16:52 +0000 (16:16 +0800)]
brcmfmac: add setting carrier state ON for successful roaming

After association, ping is not working when sweeping the channel at the
AP side. It is caused by having incorrect carrier state (OFF) for the STA
in successful roaming. This patch sets the carrier state ON for the case.

Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agobrcmfmac: fix wrong num_different_channels when mchan feature enabled
Wright Feng [Thu, 3 Aug 2017 09:37:59 +0000 (17:37 +0800)]
brcmfmac: fix wrong num_different_channels when mchan feature enabled

When the device/firmware supports multi-channel, it can have P2P
connection and regular connection with AP simultaneous. In this case,
the num_different_channels in wiphy info was not correct when firmware
supports multi-channel (The iw wiphy# info showed "#channels <= 1" in
interface combinations). It caused association failed and error message
"CTRL-EVENT-FREQ-CONFLICT error" in wpa_supplicant when P2P GO interface
was running at the same time.
The root cause is that the num_different_channels was always overridden
to 1 in brcmf_setup_ifmodes even multi-channel was enabled.
We correct the logic by moving num_different_channels setting forward.

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agobrcmfmac: Add support for CYW4373 SDIO/USB chipset
Chi-Hsien Lin [Thu, 3 Aug 2017 09:37:58 +0000 (17:37 +0800)]
brcmfmac: Add support for CYW4373 SDIO/USB chipset

Add support for CYW4373 SDIO/USB chipset.
CYW4373 is a 1x1 dual-band 11ac chipset with 20/40/80Mhz channel support.
It's a WiFi/BT combo device.

Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agobrcmfmac: set wpa_auth to WPA_AUTH_DISABLED in AP/OPEN security mode
Wright Feng [Thu, 3 Aug 2017 09:37:57 +0000 (17:37 +0800)]
brcmfmac: set wpa_auth to WPA_AUTH_DISABLED in AP/OPEN security mode

When setting wpa_auth to WPA_AUTH_NONE(1) in AP mode with WEP security,
firmware will set privacy bit and add WPA OUI in VENDOR IE in beacon and
probe response. The security type in softAP beacons confuse the
supplicant in client side, and the user client will see [WPA-?] in
supplicant scan result. So we set WPA_AUTH_DISABLED in softAP mode with
OPEN security.

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agomwifiex: p2p: use separate device address
Xinming Hu [Mon, 7 Aug 2017 01:36:06 +0000 (01:36 +0000)]
mwifiex: p2p: use separate device address

Per below statement about p2p device address in WFA P2P
spec $2.4.3:

The P2P Device Address of a P2P Device shall be its globally
administered MAC address, or its globally administered MAC
address with the locally administered bit set.

This patch follow above statement, using a separate device
address for p2p interface

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agomwifiex: wrapper wps ie in pass through tlv
Xinming Hu [Thu, 3 Aug 2017 09:13:28 +0000 (09:13 +0000)]
mwifiex: wrapper wps ie in pass through tlv

This patch wrapper wps ie in pass through tlv, so that
firmware could parse correctly.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agomwifiex: Do not change bss_num in change_virtual_intf
Xinming Hu [Thu, 3 Aug 2017 09:13:27 +0000 (09:13 +0000)]
mwifiex: Do not change bss_num in change_virtual_intf

Commit 4d7ab36f0c47 ("mwifiex: Do not change bss_type in
change_virtual_intf") kept original bss_type unchanged. bss_num should
keep the same style, in this way. Unique tuple (bss_type, bss_num) will
be able to locate the right priv structure.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agomwifiex: replace netif_carrier_on/off by netif_device_attach/dettach
Ganapathi Bhat [Wed, 2 Aug 2017 20:04:46 +0000 (01:34 +0530)]
mwifiex: replace netif_carrier_on/off by netif_device_attach/dettach

Driver is doing netif_carrier_off during suspend, which will set
the IFF_LOWER_UP flag to 0. As a result certain applications
will think this as a real carrier down and behave accordingly.
This will cause issues like loss of IP address, for example. To
fix this use netif_device_dettach during suspend.

Fixes: 0026b32d723e ('mwifiex: fix Tx timeout issue during suspend test')

Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: RTS threshold configuration
Karun Eagalapati [Thu, 3 Aug 2017 14:29:04 +0000 (19:59 +0530)]
rsi: RTS threshold configuration

Provision is added for configuring RTS threshold by sending
vap dynamic update frame to firmware.

Signed-off-by: Karun Eagalapati <karun256@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: buffer available interrupt handling
Karun Eagalapati [Thu, 3 Aug 2017 14:29:03 +0000 (19:59 +0530)]
rsi: buffer available interrupt handling

BUFFER_AVAILABLE interrupt is sent by firmware to indicate
change in buffer status. We should check buffer status while
handling this interrupt. Currently buffer status is checked
only while dequeueing packets. This patch fixes a data
traffic stuck problem observed occasionally.

Signed-off-by: Karun Eagalapati <karun256@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: buffer full check optimization
Karun Eagalapati [Thu, 3 Aug 2017 14:29:02 +0000 (19:59 +0530)]
rsi: buffer full check optimization

We get buffer full event from firmware whenever Tx queue is full
Host should stop writing packets after this and resume after
buffer free event.
Buffer status checking is optimized for once in 4 times if
BUFF_FULL condition is not set, otherwise once for every
packet.

Signed-off-by: Karun Eagalapati <karun256@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: rename sdio_read_buffer_status_register
Karun Eagalapati [Thu, 3 Aug 2017 14:29:01 +0000 (19:59 +0530)]
rsi: rename sdio_read_buffer_status_register

rsi_sdio_check_buffer_status would be the appropriate name
for this function as we are checking hardware buffers
availability status.

Signed-off-by: Karun Eagalapati <karun256@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: add support for U-APSD power save
Karun Eagalapati [Thu, 3 Aug 2017 14:29:00 +0000 (19:59 +0530)]
rsi: add support for U-APSD power save

This patch adds support for U-APSD power save. Configuration
frame is downloaded to firmware with default settings and
support is advertised to mac80211

Signed-off-by: Karun Eagalapati <karun256@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: add support for legacy power save
Karun Eagalapati [Thu, 3 Aug 2017 14:28:59 +0000 (19:58 +0530)]
rsi: add support for legacy power save

This patch adds support for legacy power save. Necessary
configuration frames are downloaded to firmware when power save
is enabled/disabled

Signed-off-by: Karun Eagalapati <karun256@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: update set_antenna command frame
Pavani Muthyala [Thu, 3 Aug 2017 14:28:58 +0000 (19:58 +0530)]
rsi: update set_antenna command frame

TX command frame set_antenna is modified to use common
descriptor structure. Also it's subframe type is set.

Signed-off-by: Pavani Muthyala <pavani.muthyala@redpinesignals.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: add support for rf-kill functionality
Pavani Muthyala [Thu, 3 Aug 2017 14:28:57 +0000 (19:58 +0530)]
rsi: add support for rf-kill functionality

This patch implements rfkill_poll handler. Also, necessary changes
are done in interface up and down handler to support rfkill
functionality.

Signed-off-by: Pavani Muthyala <pavani.muthyala@redpinesignals.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agorsi: fix uninitialized descriptor pointer issue
Prameela Rani Garnepudi [Thu, 3 Aug 2017 14:26:39 +0000 (19:56 +0530)]
rsi: fix uninitialized descriptor pointer issue

This patch fixes the uninitialized descriptor pointer
issue in function rsi_send_internal_mgmt_frame().
Descriptor should point to start of the skb data.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 9a629fafe7d8 ("rsi: immediate wakeup bit and priority for TX command packets")
Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 years agobcma: make BCMA a menuconfig to ease disabling it all
Vincent Legoll [Mon, 17 Apr 2017 10:07:30 +0000 (12:07 +0200)]
bcma: make BCMA a menuconfig to ease disabling it all

No need to get into the submenu to disable all BCMA-related config entries.

Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>