Commit Graph

693497 Commits

Author SHA1 Message Date
Sergey Matyukevich
867ba964fa 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>
2017-08-17 10:05:01 +03:00
Sergey Matyukevich
c58730cab8 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>
2017-08-17 10:05:00 +03:00
Sergey Matyukevich
7376947dfb 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>
2017-08-17 10:04:54 +03:00
Sergey Matyukevich
0db63e3799 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>
2017-08-17 10:04:37 +03:00
Ganapathi Bhat
89001c1c8d 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>
2017-08-17 09:59:40 +03:00
Ganapathi Bhat
2af2c2c77e 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>
2017-08-17 09:59:39 +03:00
Arend Van Spriel
e9bf53ab1e brcmfmac: feature check for multi-scheduled scan fails on bcm4343x devices
The firmware feature check introduced for multi-scheduled scan turned out
to be failing for bcm4343{0,1,8} devices resulting in a firmware crash.
The reason for this crash has not yet been root cause so this patch avoids
the feature check for those device as a short-term fix.

Reported-by: Stefan Wahren <stefan.wahren@i2se.com>
Reported-by: Ian Molton <ian@mnementh.co.uk>
Fixes: 9fe929aaac ("brcmfmac: add firmware feature detection for gscan feature")
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-08-14 11:09:30 +03:00
Kalle Valo
3d6b2d4e36 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.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEF3LNfgb2BPWm68smoUecoho8xfoFAlmNUfgACgkQoUecoho8
 xfrOcg//fJFNdMg628vzxZmWCA9r3kEho9Z9ryKBZ/zUtFb0cskUXBFzHolWsdqm
 YbqxNIFZpvSH5kDW1hlZyUabG6dzImirC1R486Csu/ZbbECEC31Kb6VRFSF0myix
 f6USH23u/j8okKChaQ0c82PLBrLQlQeRyRtuLJmW6q02zGDmv/2Ol1UFopfh7IkO
 FLB389Cfv83TwB1QJpcmdkmtbyRYhlBVSygJOTVO7pydxXCXxoFACBUEDevmSeVT
 RS1Iips19U/fUPIyi8El4DqQ+/wjmmsB4jqb5I8kUI6LUWdPeh260ofgRJ7WIG4A
 jPWXkAUBWGqCGHnetj+0F+586fX6zqBVHTXenOVN0pWaSt1VD9O9Xp+I3YQAn2LN
 AeMkA+fyKZ35+h9zWHG2DONficVR2HvGkyS3WsWdgLqA77ZQvLVRNPECBL8vdBlw
 b/1HUmd7QjwePgZOtr27/Vd9USyLVXFbOACuYJByPrd0VnyYgI2yALb/gmNNn3hZ
 vm7XrOwWJ9guPeugnOck8cxPx7337kiv+CsR3GUQdKIJ45bV68M3MUBvupxt6PaJ
 NGVY9qqSQVvW/dB5Yc53/J6s122ImUSMNbYAA1OiGGky1NUu76AmJZpeQCQiliwe
 NvTWJmRHQt7yjPeA+g8vWDASok468Lx4/Q3YZpW6EFf3TUzzknA=
 =PgZZ
 -----END PGP SIGNATURE-----

Merge tag 'iwlwifi-next-for-kalle-2017-08-11' of git://git.kernel.org/pub/scm/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.
2017-08-11 17:07:40 +03:00
Arvind Yadav
a67b133b9d 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>
2017-08-11 16:53:41 +03:00
Xinming Hu
f18bbe5c86 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>
2017-08-10 11:58:38 +03:00
Arvind Yadav
ecf23a788e 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>
2017-08-10 11:56:04 +03:00
Arvind Yadav
b924ffd7a4 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>
2017-08-10 11:56:04 +03:00
Arvind Yadav
3a55a4afd1 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>
2017-08-10 11:56:03 +03:00
Arvind Yadav
5033d70de1 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>
2017-08-10 11:56:03 +03:00
Arvind Yadav
e0b081b205 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>
2017-08-10 11:56:02 +03:00
Arvind Yadav
543e4f8750 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>
2017-08-10 11:56:02 +03:00
Arvind Yadav
c7bb7d79cf 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>
2017-08-10 11:56:01 +03:00
Arvind Yadav
88ee79a1a1 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>
2017-08-10 11:56:01 +03:00
Arvind Yadav
e2717b3127 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>
2017-08-10 11:56:00 +03:00
Arvind Yadav
7516dbd470 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>
2017-08-10 11:56:00 +03:00
Arvind Yadav
8a3132fa6b 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>
2017-08-10 11:55:59 +03:00
Arvind Yadav
3673c417f5 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>
2017-08-10 11:55:59 +03:00
Arvind Yadav
54c9f21605 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>
2017-08-10 11:55:58 +03:00
Arvind Yadav
c4291319b6 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>
2017-08-10 11:55:57 +03:00
Arvind Yadav
22796d1492 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>
2017-08-10 11:55:57 +03:00
Arvind Yadav
76f6a5c80a 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>
2017-08-10 11:55:56 +03:00
Arvind Yadav
c5c60b2d57 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>
2017-08-10 11:55:56 +03:00
Kalle Valo
9d6b9b8d1c Some more fixes for 4.13
* Fix a memory leak in the SAR code;
 * Fix a stuck queue case in AP mode;
 * Convert a WARN to a simple debug in a legitimate race case (from
   which we can recover);
 * Fix a severe throughput aggregation on 9000-family devices due to
   aggregation issues.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEF3LNfgb2BPWm68smoUecoho8xfoFAlmKtg4ACgkQoUecoho8
 xfqUhg//be9lSS53JjzwQ1YuKKAIPOkWgpspO/9w8MUYcrqGtjHG1eajglabgG8n
 dQLmjZbrP8rEwp+/9oFLdFC+8YWqqdaqslpgX8D5HHjU4xuiXgeahxwcn+Kbu77D
 TAfifQfya5VnC/WdpJdQ7YZaLNh1uAEypSSmYwoE9rEaXV7JqdlFKMD26qy41iZL
 u9lLd27NNItG8GbkxfIKLoZ9rayisq3aFWCu8/a0jpxhdtSKPk9ruQXgj5fOhmKQ
 baVCeWFicyja8tqMfNSdVaSDhugv3UujcKqCJg5qFr+cpKeWKaQhaipiejWc8Td7
 bMxU8bHi39S6qEHZ0HwpFsbf37SeEswsx+Gu0Qq81IReJczCPlByrPuJNYeMnKJC
 a8zUNnonWPWmyhq6YQYac6uBAh/ObKQ+Y3WvKtM/U2l+CKlXpdqGEzAIFB1JCHzG
 BM0Xsz2su68nfQtG9/a21NStzCld5JDcsMyRCwzrryx3YawKff8gSv5WiM0Q24Cz
 koeex8ImLpIIgNgGeT/6yonI+rxry3QZBsVDlM/b7HqNZbss/YT+ucAhUizVqlwe
 vXuZVVihGXD4PjWt8dQckqcmPFhKWKYJuRlC3LLL1DxTmuBsFImAtxHt8LYU4EoZ
 Z5yzUA0I3mzKqzONuyioRsgTHRL5PJQZ2VwGXFfq85k3DegDrGo=
 =8UWF
 -----END PGP SIGNATURE-----

Merge tag 'iwlwifi-for-kalle-2018-08-09' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes

Some more fixes for 4.13

* Fix a memory leak in the SAR code;
* Fix a stuck queue case in AP mode;
* Convert a WARN to a simple debug in a legitimate race case (from
  which we can recover);
* Fix a severe throughput aggregation on 9000-family devices due to
  aggregation issues.
2017-08-09 22:37:23 +03:00
Emmanuel Grumbach
88c5f476ba 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: 430a3bbafd ("iwlwifi: mvm: BT Coex - new API")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-08-09 21:14:44 +03:00
Emmanuel Grumbach
9bb3d5a003 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>
2017-08-09 21:14:44 +03:00
Luca Coelho
fb70d49f2a 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>
2017-08-09 21:14:43 +03:00
Golan Ben-Ami
f4ca70ef93 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: 4c9706dc2f ("iwlwifi: update nmi register")
Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-08-09 21:14:43 +03:00
Emmanuel Grumbach
39fff75993 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>
2017-08-09 21:14:42 +03:00
Shaul Triebitz
732d06e9d9 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>
2017-08-09 21:14:42 +03:00
Matt Chen
0bef1b83d3 iwlwifi: mvm: don't send CTDP commands via debugfs if not supported
Fix this issue if it is not supported by the firmware.

Fixes: 00f481bd89 ("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>
2017-08-09 21:14:42 +03:00
Haim Dreyfuss
6ca33f8bae 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>
2017-08-09 21:14:41 +03:00
Naftali Goldstein
20fc690f38 iwlwifi: mvm: send delba upon rx ba session timeout
When an RX block-ack session times out, the firmware, which offloads
RX reordering but not the BA session negotiation, stops the session
but doesn't send a DELBA.  This causes the the session to remain
active in the remote device, so no more BA sessions will be
established, causing a severe throughput degradation due to the lack
of aggregation.

Use the new ieee80211_rx_ba_timer_expired API when the ba session timer
expires, since this will tear down the ba session and also send a delba.

The previous API used is intended for drivers that offload the
addba/delba negotiation, but not the rx reordering, while our driver
does the opposite.

This patch depends on "mac80211: add api to start ba session timer
expired flow".

Signed-off-by: Naftali Goldstein <naftali.goldstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-08-09 10:05:01 +03:00
Naftali Goldstein
04c2cf3436 mac80211: add api to start ba session timer expired flow
Some drivers handle rx buffer reordering internally (and by extension
handle also the rx ba session timer internally), but do not ofload the
addba/delba negotiation.
Add an api for these drivers to properly tear-down the ba session,
including sending a delba.

Signed-off-by: Naftali Goldstein <naftali.goldstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-08-09 09:49:42 +03:00
Chaya Rachel Ivgi
944eafc255 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>
2017-08-09 09:35:16 +03:00
Shaul Triebitz
c135cb564c 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>
2017-08-09 09:35:15 +03:00
Golan Ben-Ami
ce27f005c9 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>
2017-08-09 09:35:15 +03:00
Liad Kaufman
36ae4f3aaf iwlwifi: fix a000 RF_ID define
One of the defines has a wrong value.

Fixes: 1afb0ae421 ("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>
2017-08-09 09:35:15 +03:00
Tzipi Peres
f6586b69b2 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>
2017-08-09 09:35:14 +03:00
Luca Coelho
cbeb58ef36 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>
2017-08-09 09:35:14 +03:00
Sharon Dvir
a4380b4eb3 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>
2017-08-09 09:35:13 +03:00
Chaya Rachel Ivgi
61d8c62646 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>
2017-08-09 09:30:15 +03:00
Bhumika Goyal
b1a1efc576 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>
2017-08-09 09:15:32 +03:00
Johannes Berg
7089ae634c 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: 503ab8c56c ("iwlwifi: Add 8000 HW family support")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-08-09 09:15:32 +03:00
Johannes Berg
4aa234eeec 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>
2017-08-09 09:15:32 +03:00
Emmanuel Grumbach
a600852a9d iwlwifi: mvm: don't WARN when a legit race happens in A-MPDU
When we start an Rx A-MPDU session, we first get the AddBA
request, then we send an ADD_STA command to the firmware
that will reply with a BAID which is a hardware resource
that tracks the BA session.
This BAID will appear on each and every frame that we get
from the firwmare until the A-MPDU session is torn down.
In the Rx path, we look at this BAID to manage the
reordering buffer.

This flow is inherently racy since the hardware will start
to put the BAID in the frames it receives even if the
firmware hasn't sent the response to the ADD_STA command.
This basically means that the driver can get frames with
a valid BAID that it doesn't know yet.
When that happens, the driver used to WARN.
Fix this by simply not WARN in this case. When the driver
will know abou the BAID, it will initialise the relevant
states and the next frame with a valid BAID will refresh
them.

Fixes: b915c10174 ("iwlwifi: mvm: add reorder buffer per queue")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2017-08-09 08:53:50 +03:00