summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-02iwlwifi: pcie: split tx to amsdu and non amsduSara Sharon
The code is different enough to justify a split. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-08-02iwlwifi: move some msix and rx functions to a common placeGolan Ben Ami
We would like to allow other utlities to init msix and rx. Put their declarations in a place accessible to other utilities. Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-08-02iwlwifi: pcie: include tcp.h implicitlyLuca Coelho
If CONFIG_IPV6 is not enabled in the kernel, tcp.h is not included implicitly from other header files, causing compilation errors. To solve that, explicitly include it in tx-gen2.c. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-08-02iwlwifi: mvm: remove dead gscan codeLuca Coelho
There was a bunch of code to support gscan which has never been used. Remove it all to cleanup and get rid of a lot of dead code. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-08-02iwlwifi: hard code power save mode to CAM for 22560 devicesGolan Ben Ami
Balanced power save mode isn't supported in the fw for 22560 devices yet. Configure the power save mode to CAM until it gets implemented. Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-08-02Revert "iwlwifi: implement fseq version mismatch warning"Sara Sharon
This reverts commit f2e66c8df0d0f10c70ed7f5e14a939714e9ee6a9. The firmware never implemented this, and they do not plan to. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-08-02iwlwifi: pcie: don't access periphery registers when not availableEmmanuel Grumbach
The periphery can't be accessed before we set the INIT_DONE bit which initializes the device. A previous patch added a reconfiguration of the MSI-X tables upon resume, but at that point in the flow, INIT_DONE wasn't set. Since the reconfiguration of the MSI-X tables require periphery access, it failed. The difference between WoWLAN and without WoWLAN is that in WoWLAN, iwl_trans_pcie_d3_suspend clears the INIT_DONE without clearing the STATUS_DEVICE_ENABLED bit in the software status. Because of that, the resume code thinks that the device is enabled, but the INIT_DONE bit has been cleared. To fix this, don't reconfigure the MSI-X tables in case WoWLAN is enabled. It will be done in iwl_trans_pcie_d3_resume anyway. Fixes: 52848a79b9d2 ("iwlwifi: pcie: reconfigure MSI-X HW on resume") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-08-02iwlwifi: mvm: configure multi RX queueSara Sharon
Currently multi-queue is disabled for 22000 devices. This was since driver isn't supposed to write to prph registers anymore, and FW needs to configure the RFH. Now that FW added support for the API - use it and remove the 22000 multi RX queue disablement. Bump min API version to avoid compatibility issues. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-08-02iwlwifi: d3: disable dbg recording before entering D3Luca Coelho
Currently the firmware does not stop recording debugging data when entering D3 and this causes trouble (e.g. sporadic wake ups). Fix that by stopping dbg recording when suspending. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-08-02iwlwifi: allow masking out memory areas from the fw dumpShahar S Matityahu
Reading and dumping memory areas takes time, and sometimes dumping all of the areas isn't necessary. Allow choosing the memory areas which should be dumped. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-08-02iwlwifi: trans: add a new op for getting DMA dataSara Sharon
Op mode will need this data in order to feed FW with it. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-08-02iwlwifi: pcie: move rxb retrieval to a helper functionSara Sharon
This makes code less indented and more readable. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-08-02iwlwifi: pcie: unionize used bd and completion descriptorSara Sharon
This allows less "dummy" declarations and casting. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-08-02iwlwifi: support new rx_mpdu_desc apiGolan Ben Ami
22560 devices use a new rx_mpdu_desc api. Update the code to use the new api. Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-08-02iwlwifi: pcie: support rx structures for 22560 devicesGolan Ben Ami
The rfh for 22560 devices has changed so it supports now the same arch of using used and free lists, but different structures to support the last. Use the new structures, hw dependent, to manage the lists. bd, the free list, uses the iwl_rx_transfer_desc, in which the vid is stored in the structs' rbid field, and the page address in the addr field. used_bd, the used list, uses the iwl_rx_completion_desc struct, in which the vid is stored in the structs' rbid field. rb_stts, the hw "write" pointer of rx is stored in a __le16 array, in which each entry represents the write pointer per queue. Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-08-02iwlwifi: pcie: add a bunch of PCI IDs for 22000 and 22560Luca Coelho
Add some missing PCI IDs for 22000 and 22560 devices. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2018-07-31rt2x00: remove redundant functions rt2x00mac_sta_{add/remove}YueHaibing
Only rt2800 subdriver of rt2x00 implement sta_add() and sta_remove(), rt2x00mac_sta_add and rt2x00mac_sta_remove has no callers after commit 9c87758cf089 ("rt2x00: call sta_add/remove directly in rt2800"). So can be removed. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31rtl818x: Replace mdelay() with msleep() in rtl8225se_rf_initJia-Ju Bai
rtl8225se_rf_init() is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This patch only replaces the mdelay() that has >20ms time to wait. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31atmel: Replace mdelay() with msleep() in probe_atmel_card()Jia-Ju Bai
probe_atmel_card() is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31wlcore: Set rx_status boottime_ns field on rxLoic Poulain
When receiving a beacon or probe response, we should update the boottime_ns field which is the timestamp the frame was received at. (cf mac80211.h) This fixes a scanning issue with Android since it relies on this timestamp to determine when the AP has been seen for the last time (via the nl80211 BSS_LAST_SEEN_BOOTTIME parameter). Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31wlcore: remove duplicate \n for some warningsH. Nikolaus Schaller
wl1271_warning() already appends a \n to the format, so adding one to the warning string gives empty lines in the log. Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31brcmfmac: specify some features per firmware versionRafał Miłecki
Some features supported by firmware aren't advertised and there is no way for a driver to query them. This includes e.g. monitor mode details. Most firmwares support monitor interface but only the latest ones /announce/ it with a "monitor" flag in the "cap" iovar. There isn't any reliable detection method for older firmwares (BRCMF_C_MONITOR was tried but "it only indicates the core part of the stack supports"). Similarly support for tagging monitor frames and building radiotap headers can't be reliably detected for all firmwares. This commit adds table that allows mapping features to firmware version. It adds mappings for 43602a1 and 4366b1 firmwares from linux-firmware.git. Both were confirmed to be passing monitor frames. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31hostap: hide unused procfs helpersYueHaibing
When CONFIG_PROC_FS isn't set, gcc warning this: drivers/net/wireless/intersil/hostap/hostap_hw.c:2901:12: warning: ‘prism2_registers_proc_show’ defined but not used [-Wunused-function] static int prism2_registers_proc_show(struct seq_file *m, void *v) drivers/net/wireless/intersil/hostap/hostap_proc.c:16:12: warning: ‘prism2_debug_proc_show’ defined but not used [-Wunused-function] static int prism2_debug_proc_show(struct seq_file *m, void *v) ^ drivers/net/wireless/intersil/hostap/hostap_proc.c:49:12: warning: ‘prism2_stats_proc_show’ defined but not used [-Wunused-function] static int prism2_stats_proc_show(struct seq_file *m, void *v) ^ drivers/net/wireless/intersil/hostap/hostap_proc.c:177:12: warning: ‘prism2_crypt_proc_show’ defined but not used [-Wunused-function] static int prism2_crypt_proc_show(struct seq_file *m, void *v) ^ fix this by adding #ifdef around them. hfa384x_read_reg is only used by prism2_registers_proc_show,so move it into #ifdef. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31atmel: hide unused procfs helpersYueHaibing
When CONFIG_PROC_FS isn't set, gcc warning this: drivers/net/wireless/atmel/atmel.c:1402:12: warning: ‘atmel_proc_show’ defined but not used [-Wunused-function] static int atmel_proc_show(struct seq_file *m, void *v) ^ fix this by adding #ifdef around it. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31ray_cs: remove redundant pointer 'p'Colin Ian King
Pointer 'p' is being assigned but is never used hence it is redundant and can be removed. Also re-work if statement to remove redundant assignment of p. Cleans up clang warning: warning: variable 'p' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31iwlegacy: remove several redundant variablesColin Ian King
Variables id, unicast, write, conf, a_band, accum_tx and ucode are assigned a value but it is never read, hence they are redundant and can be removed. Cleans up clang warnings: warning: variable 'id' set but not used [-Wunused-but-set-variable] warning: variable 'unicast' set but not used [-Wunused-but-set-variable] warning: variable 'write' set but not used [-Wunused-but-set-variable] warning: variable 'conf' set but not used [-Wunused-but-set-variable] warning: variable 'a_band' set but not used [-Wunused-but-set-variable] warning: variable 'tx' set but not used [-Wunused-but-set-variable] warning: variable 'accum_tx' set but not used [-Wunused-but-set-variable] warning: variable 'ucode' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31ipw2x00: remove redundant variables len, ret, reason and cryptColin Ian King
Variables len, ret, reason and crypt are assigned values that are never read, hence they are redundant and can be removed. Note: For the variable ret, a return code is being assigned, but this is not returned and 0 is currently being returned, I believe this is OK. Cleans up clang warnings: warning: variable 'len' set but not used [-Wunused-but-set-variable] variable 'ret' set but not used [-Wunused-but-set-variable] warning: variable 'reason' set but not used [-Wunused-but-set-variable] warning: variable 'crypt' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31airo: remove unused variables len and dev and clean up formattingColin Ian King
Variables len and dev assigned values but are never used hence they are redundant and can be removed. Also add in white space in for-loop and remove some { } braces on if statement. Cleans up clang warnings: warning: variable 'len' set but not used [-Wunused-but-set-variable] warning: variable 'dev' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31rsi: move init_done flag to end of rsi_91x_init().Amol Hanwate
common->init_done flag should set after basic initialization. Hence, moving init_done flag at end of rsi_91x_init(). Signed-off-by: Amol Hanwate <amol.hanwate@redpinesignals.com> Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31rsi: fill rx_params only once.Amol Hanwate
rx_params are getting updated two times in driver, which is not required. Hence, removing duplicate updation of rx_params from rsi_prepare_skb(). Signed-off-by: Amol Hanwate <amol.hanwate@redpinesignals.com> Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31rsi: Correct RSI_NEEDED_HEADROOM in mac80211_attach.Amol Hanwate
Currently, RSI_NEEDED_HEADROOM is '80' for rsi driver, which is wrong. As per rsi internal frame format, the RSI_NEEDED_HEADROOM shall be '84', which is 64(dword_align) + 4(extended_desc) + 16(frame_desc). Hence, corrected the needed headroom. Signed-off-by: Amol Hanwate <amol.hanwate@redpinesignals.com> Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31rsi: add firmware support for AP+BT dual modeSiva Rebbagondla
Currently, AP mode will work on only WLAN alone firmware. To give support for AP and BT dual mode, adding firmware entry in 'struct ta_metadata'. The firmware entry is based on what coex_mode is used in driver and coex mode '4' for all AP+BT related functionalities. Hence, added the same. Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31rsi: remove redundant flash_content variableSiva Rebbagondla
while cleaning up the driver, observed that flash_content pointer is not necessary in rsi_load_firmware(). Instead of this, driver can use 'fw_entry->data' directly.Hence, removed redundant flash_content pointer. Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31rsi: remove redundant device idsSiva Rebbagondla
Removing redundant device id's from both usb and sdio idtables, as rsi driver currently supporting only one module(RS9113). Also, replaced ids with specific defines. Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31rsi: optimize virtual interfacesSiva Rebbagondla
Due to multiple calls of add interface routine, vif is getting duplicated and at certain instance, we are out of vifs, causing the driver to behave abnormal. Fix: Every vif has a unique mac-id, when we got a vif with same mac-id as the previous id's, we will override the respective vif. Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com> Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31rsi: fix for WoWLAN wakeup in security mode.Siva Rebbagondla
System is unable to wake-up through magic-packet in secured connections. Because key descriptor is getting corrupted and firmware is unable to decrypt the magic packet. Fixed the issue by properly preparing it before sending it to firmware. Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com> Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31rsi: fix for 40MHZ connection issue.Ganapathi Raju
Radio capabilities packet is not prepared properly for 40MHZ case, ppe_ack_rate is a two byte variable which is initialized wrongly, hence we are unable to connect, resolved by assigning it properly. Signed-off-by: Ganapathi Raju <ganapathi.kondraju@redpinesignals.com> Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31rsi: fix for low throughput issueSiva Rebbagondla
observed low throughput rates during verification. This is because, QoS enable flag is overridden by sequence number in the data descriptor frame. Hence, added the fix for same. Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com> Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31mwifiex: Fix skipped vendor specific IEsRoman Stratiienko
Mwifiex firmware inserts only Microsoft information element Allow other vendor specific IEs to pass from userspace Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31mwifiex: use atomic bitops to represent adapter status variablesGanapathi Bhat
Driver is using boolean variables to maintain vairous status information of adapter. These status variables are accessed by multiple threads and there is a possibility of a race. To avoid this, convert these variables to a set of bitops flags, to be operated atomically. Below variables of mwifiex_adapter are converted to bitop flags: surprise_removed is_cmd_timedout is_suspended is_hs_configured hs_enabling Signed-off-by: Ganapathi Bhat <gbhat@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31mwifiex: restructure rx_reorder_tbl_lock usageGanapathi Bhat
Driver must ensure that whenever it holds a pointer to the list entry mwifiex_rx_reorder_tbl, it must protect the same with rx_reorder_tbl_lock. At present there are many places where driver does not ensure this. To cover all cases, spinlocks in below funcions are moved out and made sure that the caller will hold the spinlock: mwifiex_11n_dispatch_pkt_until_start_win() mwifiex_11n_scan_and_dispatch() mwifiex_del_rx_reorder_entry() mwifiex_11n_get_rx_reorder_tbl() mwifiex_11n_find_last_seq_num() Signed-off-by: Ganapathi Bhat <gbhat@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-31mwifiex: replace rx_pkt_lock by rx_reorder_tbl_lockGanapathi Bhat
At present driver spinlock protects iteration of list rx_reorder_tbl_ptr with rx_reorder_tbl_lock. To protect the individual items in this list, it uses rx_pkt_lock. But, we can use a single rx_reorder_tbl_lock for both purposes. This patch replaces rx_pkt_lock by rx_reorder_tbl_lock. Signed-off-by: Ganapathi Bhat <gbhat@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-30mt76x2: fix CCK protection control frame rateLorenzo Bianconi
Use 11M as tx rate for CCK protection control frames Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e") Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-30mt76x2: add frame protection supportLorenzo Bianconi
Introduce mac80211 rts threshold handler in order to add frame protection support to mt76x2 driver Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-30mt7601u: expose 802.11w supportDavide Caratti
Set MFP_CAPABLE bit in hw flag capabilities exported by the driver Signed-off-by: Davide Caratti <dcaratti@redhat.com> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-30mt7601u: use sw encryption for hw unsupported ciphersLorenzo Bianconi
Fall back to software encryption for hw unsupported ciphers in order to enable 802.11w Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-30qtnfmac: enable multiple SSIDs scan supportAndrey Shevchenko
Enable support for multiple SSIDs scans. Get max number of supported SSIDs from firmware and report to cfg80211 core. Signed-off-by: Andrey Shevchenko <ashevchenko@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-30qtnfmac: implement cfg80211 power management callbackSergei Maksimenko
Implement set_power_mgmt() callback that forwards power saving settings to the device firmware. Signed-off-by: Sergei Maksimenko <smaksimenko@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-07-30Merge tag 'iwlwifi-next-for-kalle-2018-07-26' of ↵Kalle Valo
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next First batch of iwlwifi patches for 4.19 * Implement 802.11ax D2.0; * Changes in the base code to support the new 22560 devices; * Support for the new 22560 device family;
2018-07-26iwlwifi: pcie: support 2k rx buffersGolan Ben Ami
The smallest rb size supported today is 4k rx buffers. 22560 devices use 2k rxb's, so allow using 2k buffers. Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>