aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2019-02-01iwlegacy: no need to check return value of debugfs_create functionsGreg Kroah-Hartman4-42/+8
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Stanislaw Gruszka <[email protected]> Cc: Kalle Valo <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01mt7601u: bump supported EEPROM versionStanislaw Gruszka1-1/+1
As reported by Michael eeprom 0d is supported and work with the driver. Dump of /sys/kernel/debug/ieee80211/phy1/mt7601u/eeprom_param with 0d EEPORM looks like this: RSSI offset: 0 0 Reference temp: f9 LNA gain: 8 Reg channels: 1-14 Per rate power: raw:05 bw20:05 bw40:05 raw:05 bw20:05 bw40:05 raw:03 bw20:03 bw40:03 raw:03 bw20:03 bw40:03 raw:04 bw20:04 bw40:04 raw:00 bw20:00 bw40:00 raw:00 bw20:00 bw40:00 raw:00 bw20:00 bw40:00 raw:02 bw20:02 bw40:02 raw:00 bw20:00 bw40:00 Per channel power: tx_power ch1:09 ch2:09 tx_power ch3:0a ch4:0a tx_power ch5:0a ch6:0a tx_power ch7:0b ch8:0b tx_power ch9:0b ch10:0b tx_power ch11:0b ch12:0b tx_power ch13:0b ch14:0b Reported-and-tested-by: Michael <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Jakub Kicinski <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01wlcore: clean up an indentation issueColin Ian King1-1/+1
There is a goto statement that is missing a tab for indentation. Fix this. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01rsi: Suppress sdhci warnings in mmcSiva Rebbagondla1-6/+9
while inserting and removing sdio module multiple times, we are getting sdhci warnings. This is because, improper assignment of ocr_avail value. Fixed this by assigning proper value. This patch is enhancement for commit 78e450719c702 ("rsi: Fix 'invalid vdd' warning in mmc"). Signed-off-by: Siva Rebbagondla <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01wireless: remove unneeded semicolonYueHaibing5-7/+7
remove unneeded semicolon Signed-off-by: YueHaibing <[email protected]> Acked-by: Ping-Ke Shih <[email protected]> Acked-by: Steve deRosier <[email protected]> Acked-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01rtlwifi: rtl818x: fix indentation issueColin Ian King1-1/+1
There is a statement that is indented too deeply. Fix this. Signed-off-by: Colin Ian King <[email protected]> Acked-by: John W. Linville <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01cw1200: fix indentation issuesColin Ian King1-2/+2
There are two lines that have indentation issues, fix these. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01libertas: fix indentation issueColin Ian King1-1/+1
There is a statement that is incorrectly indented, fix it. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01rt2x00: Work around a firmware bug with shared keysBernd Edlinger1-89/+4
Apparently the rt2x61 firmware fails temporarily to decode broadcast packets if the shared keys are not assigned in the "correct" sequence. At the same time unicast packets work fine, since they are encrypted with the pairwise key. At least with WPA2 CCMP mode the shared keys are set in the following sequence: keyidx=1, 2, 1, 2. After a while only keyidx 2 gets decrypted, and keyidx 1 is ignored, probably because there is never a keyidx 3. Symptoms are arping -b works for 10 minutes, since keyidx=2 is used for broadcast, and then it stops working for 10 minutes, because keyidx=1 is used. That failure mode repeats forever. Note, the firmware does not even know which keyidx corresponds to which hw_key_idx so the firmware is trying to be smarter than the driver, which is bound to fail. As workaround the function rt61pci_config_shared_key requests software decryption of the shared keys, by returning EOPNOTSUPP. However, pairwise keys are still handled by hardware which works just fine. Signed-off-by: Bernd Edlinger <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01qtnfmac: qtnf_cmd_send_with_reply cleanupSergey Matyukevich1-6/+4
Use existing variable with dereferenced cmd_id field. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01qtnfmac: remove unused declarationsSergey Matyukevich1-2/+0
Remove declarations for inexistent functions from bus.h header. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01qtnfmac: add missing bss record to host scan cacheSergey Matyukevich2-5/+78
Make sure that valid BSS entry exists in wireless core record even in the case of successful connect reported by firmware. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01qtnfmac: convert to SPDX license identifiersSergey Matyukevich23-327/+45
Replace textual license with SPDX-License-Identifier. Add an SPDX-License-Identifier for the Makefile. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01qtnfmac: do not reject retry changes in driverSergey Matyukevich2-5/+8
Do not reject RETRY changes in driver. This decision should belong to firmware. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01qtnfmac: switch to 32bit values for RTS/FRAG thresholdsSergey Matyukevich3-6/+17
Host wireless stack uses u32 type for RTS/FRAG threshold values. Switch to u32 in driver: pass u32 values to firmware and let firmware properly adapt these values according to its internal representation. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01qtnfmac: add support for 4addr modeSergey Matyukevich5-17/+31
Advertise WIPHY_FLAG_4ADDR_STATION capability to wireless core. Send use4addr interface change flag to firmware in change_virtual_intf cfg80211 callback. In order to enable adding wireless station interface to bridge one should turn on 4addr mode using the following command: $ iw dev wlan0 set 4addr on $ brctl addif br0 wlan0 If this commands succeeds, then interface can be added to bridge. Note that when wireless interface is added to bridge, wpa_supplicant should be started with appropriate -b <brname> parameter, e.g: $ wpa_supplicant -Dnl80211 -iwlan0 -c/path/to/wpa.conf -b br0 Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01qtnfmac: fix INTx interrupt handlingSergey Matyukevich1-3/+3
In the current implementation INTx interrupt is deasserted after the control path processing. However this may lead to missed interrupts from the wireless card. For instance, this may happen as a result of control path activity, when another interrupt arrives before INTx is deasserted. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01qtnfmac: support EBUSY errcode for QLINK protocolAndrey Shevchenko2-0/+3
Add support of EBUSY error code for remote procedures over QLINK protocol. Signed-off-by: Andrey Shevchenko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01mwifiex: add support for sd8977 chipsetHemantkumar Suthar3-1/+76
This patch adds support for 8977 chipset to mwifiex with SDIO interface. Register offsets and supported feature flags are updated. Firmware image used will be mrvl/sd8977_uapsta.bin. Signed-off-by: Hemantkumar Suthar <[email protected]> Signed-off-by: Rakesh Parmar <[email protected]> Signed-off-by: Cathy Luo <[email protected]> Signed-off-by: Ganapathi Bhat <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01rtlwifi: Don't clear num_rx_inperiod too earlyBernd Edlinger1-2/+2
This patch moves the clearing of rtlpriv->link_info.num_rx_inperiod in rtl_watchdog_wq_callback a few lines down. This is necessary since it is still used in the "AP off" detection code block. Moved clearing of rtlpriv->link_info.num_rx_inperiod as well for consistency. Signed-off-by: Bernd Edlinger <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01rtl8723ae: Re-introduce the adaptive rate controlBernd Edlinger1-2/+85
This re-introduces the function rtl8723e_dm_refresh_rate_adaptive_mask. This function was present in a previous version of the code base, it works just fine for me -- as long as it is not using stale data. Unlike the original version of this function it avoids using dm.undec_sm_pwdb when no beacon was received. Fixed a style nit in rtl8723e_dm_init_rate_adaptive_mask. Signed-off-by: Bernd Edlinger <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01rtl8723ae: Dont use old data for input gain controlBernd Edlinger2-0/+10
When no beacon was received, the value in dm.undec_sm_pwdb is most likely out of date and should not be used to adjust the input path. Assume instead that the signal level is low. Fix the state machine in rtl8723e_dm_cck_packet_detection_thresh which did not clear pre_cck_fa_state when changing cur_cck_pd_state from CCK_PD_STAGE_LOWRSSI/CCK_FA_STAGE_LOW to CCK_PD_STAGE_HIGHRSSI and back again to CCK_PD_STAGE_LOWRSSI/CCK_FA_STAGE_LOW, the register RCCK0_CCA not written to 0x83 on the second change. Explicitly initialize pre_cck_fa_state/cur_cck_fa_state in rtl_dm_diginit. Signed-off-by: Bernd Edlinger <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01rtl8723ae: Take the FW LPS mode handling outBernd Edlinger1-4/+4
This appears to trigger a firmware bug and causes severe problems with rtl8723ae PCI devices. When the power save mode is activated for longer periods of time the firmware stops to receive any packets. This problem was exposed by commit 873ffe154ae0 ("rtlwifi: Fix logic error in enter/exit power-save mode"). Previously the power save mode was only active rarely and only for a short time so that the problem was not noticeable. Signed-off-by: Bernd Edlinger <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01libertas: add checks for the return value of sysfs_create_groupKangjie Lu1-0/+5
sysfs_create_group() could fail. The fix checkes its return values and issue error messages if it fails. Signed-off-by: Kangjie Lu <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01qtnfmac: use struct_size() in kzalloc()Gustavo A. R. Silva1-3/+2
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; void *entry[]; }; instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL); This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01rt2x00: reduce tx power to nominal level on RT6352Tomislav Požega1-1/+1
Current implementation of RT6352 support provides too high tx power at least on iPA/eLNA devices. Reduce amplification of variable gain amplifier by 6dB to match board target power of 17dBm. Transmited signal strength with this patch is similar to that of stock firmware or pandorabox firmware. Throughput measured with iperf improves. Device tested: Xiaomi Miwifi Mini. Signed-off-by: Tomislav Požega <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-01Merge remote-tracking branch 'net-next/master' into mac80211-nextJohannes Berg2-1/+8
Merge net-next so that we get the changes from net, which would otherwise conflict with the NLA_POLICY_NESTED/_ARRAY changes. Signed-off-by: Johannes Berg <[email protected]>
2019-01-31ath10k: correct bus type for WCN3990Brian Norris1-1/+1
WCN3990 is SNOC, not PCI. This prevents probing WCN3990. Fixes: 367c899f622c ("ath10k: add bus type check in ath10k_init_hw_params") Signed-off-by: Brian Norris <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-01-31mt76x0: eeprom: fix chan_vs_power map in mt76x0_get_power_infoLorenzo Bianconi3-27/+25
Report correct eeprom per channel power value. Fix chan_vs_power map in mt76x0_get_power_info routine Fixes: f2a2e819d672 ("mt76x0: remove eeprom dependency from mt76x0_get_power_info") Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-01-31iwlwifi: mvm: fix merge damage in iwl_mvm_rx_mpdu_mq()Luca Coelho1-0/+3
A call to iwl_mvm_add_rtap_sniffer_config() was missing due to a merge damage when I submitted the patch mentioned below. And this causes the following compilation warning: drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:195:13: warning: 'iwl_mvm_add_rtap_sniffer_config' defined but not used [-Wunused-function] static void iwl_mvm_add_rtap_sniffer_config(struct iwl_mvm *mvm, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix it by adding the if block that calls this function. Fixes: 9bf13bee2d74 ("iwlwifi: mvm: include configured sniffer AID in radiotap") Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-01-30Merge tag 'iwlwifi-next-for-kalle-2019-01-29' of ↵Kalle Valo45-2046/+1759
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Second batch of iwlwifi patches intended for v5.1 * A bunch of fixes for issues found with static analyzers; * Relicense the pcie submodule to dual GPL/BSD; * Reworked the TOF/CSI implementation; * Work on new debugging infra continues; * Some product name updates in the human-readable strings * Some more cleanups for the device configuration refactoring; * General bugfixes; * Other cleanups and small fixes;
2019-01-30Merge tag 'mt76-for-kvalo-2019-01-22' of https://github.com/nbd168/wirelessKalle Valo32-241/+664
first batch of mt76 patches for 5.1 * fixes for mt76x0/mt76x2 * energy detect regulatory compliance fixes * tx status handling fixes * preparation for MT7603 support * channel switch announcement support
2019-01-29iwiwifi: fix bad monitor buffer register addressesShahar S Matityahu1-2/+2
The monitor buffer register address is wrong. Set the right address Signed-off-by: Shahar S Matityahu <[email protected]> Fixes: c2d202017da1 ("iwlwifi: pcie: add firmware monitor capabilities") Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: dbg_ini: set dump mask BIT(n) instead of nShahar S Matityahu1-2/+2
The driver sets dump_mask value instead of BIT(value). fix it by updating dump_mask correctly. Signed-off-by: Shahar S Matityahu <[email protected]> Fixes: 7a14c23dcdee ("iwlwifi: dbg: dump data according to the new ini TLVs") Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: dbg_ini: retrieve dump_delay value properlyShahar S Matityahu1-1/+1
The driver uses ignore_consec instead of dump_delay. Fix it by using dump_delay as expected. Signed-off-by: Shahar S Matityahu <[email protected]> Fixes: fe1b7d6c2888 ("iwlwifi: add support for triggering ini triggers") Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: dbg_ini: properly handle ini user triggerShahar S Matityahu1-4/+0
in case of a user trigger while ini is enable we change FW_DBG_TRIGGER_USER to IWL_FW_TRIGGER_ID_USER_TRIGGER in iwl_fw_dbg_collect and then again we attempt to do so in _iwl_fw_error_ini_dump which causes to abort the dump. Fix it by removing the second check in _iwl_fw_error_ini_dump. Signed-off-by: Shahar S Matityahu <[email protected]> Fixes: 7a14c23dcdee ("iwlwifi: dbg: dump data according to the new ini TLVs") Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: dbg_ini: allocate dram buffer with proper flagsShahar S Matityahu1-2/+4
Use the same flags we use in the legacy buffer allocation. Missing __GFP_NOWARN will cause an unwanted warning incase we fail to allocate. Missing __GFP_ZERO will give a buffer initially filled with garbage which can make debug difficult in case our wrap count is zero. Signed-off-by: Shahar S Matityahu <[email protected]> Fixes: d47902f9f71d ("iwlwifi: dbg: add apply point logic") Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: mvm: update firmware when MU EDCA params changeShaul Triebitz1-0/+6
When MU EDCA params change, resend the STA_HE_CTXT command updating the MU EDCA params. Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: trigger dump on assert prior to setting the device upShahar S Matityahu1-0/+10
In the regular flow, when we receive an assert, ieee80211_reconfig is called which reconfig the driver using iwl_mvm_mac_start. iwl_mvm_mac_start is clearing the restart bit and does dump collection. Prior to setting the device up, ieee80211_reconfig does not call iwl_mvm_mac_start since there is nothing to reconfig and we miss the dump collection of the assert. solve it by checking the restart bit before we stop the device and trigger a dump collection in case it is set. note that we don't need to do it in the fmac case since in fmac assert flow in iwl_fmac_nic_error we call iwl_fw_dbg_collect_desc so we can be sure that there will a dump collection in iwl_fmac_stop_device. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: mvm: include configured sniffer AID in radiotapJohannes Berg4-5/+84
In order to make more sense out of the captured radiotap data e.g. when the configured AID changes, add the currently configured AID to the radiotap data as a vendor extension field. This is made race-free by updating the included value from inside the RX path (using a notification wait) for the command response from the firmware, which thus means it's serialized with frame RX. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: mvm: document monitor mode reorder buffer bypassJohannes Berg1-0/+2
The reorder buffer is bypassed because the firmware won't have any BA sessions, document this. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: update product name for 9260 and 9560Ihab Zhaika4-94/+134
update the product name for the some of the cards from the series of 9260 and 9560 Signed-off-by: Ihab Zhaika <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: mvm: disable completely low latency mode with debugfsMordechay Goodstein2-8/+103
We introduce a new state for latency, force mode, in force mode you can enable always to be in low latency or always to be in non low latency. This is required for test mode in max TpT test. Signed-off-by: Mordechay Goodstein <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: mvm: freeze management TXQ timer when station goes to sleepEmmanuel Grumbach1-1/+1
We maintain a timer for each Tx queue to detect stalls and be able to recover / debug. When we work in AP mode, we can freeze the Tx queue timer if a station goes to sleep, because we don't want to warn about stalls that are caused by faulty clients that don't wake up on time. This mechanism was applied to the queues of the clients, but the management queue was omitted. Fix that. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: mvm: Change FW channel info APIDavid Spinadel9-71/+182
Change iwl_fw_channel_info structure so it can have channel number greater than 255. This is needed for 6 GHz channel numbers. Change all relevant structs and member accesses accordingly. The new API is indicated by a TLV capability bit. Signed-off-by: David Spinadel <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: mvm: implement CSI reportingJohannes Berg7-12/+94
Implement CSI (channel estimation matrix) reporting in the mvm driver, if the firmware has the capability. Currently only a debugfs API is provided as the API is still under discussion. For now, RX aggregation must be disabled to use this feature on data frames as we haven't found a good way to attach the data to A-MPDUs, given complexities with multi-queue. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: mvm: add location APIsJohannes Berg4-0/+712
Add the location/time-of-flight/FTM APIs that we'll use in follow-up patches to implement FTM responder and initiator. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: mvm: Disconnect on large beacon lossAndrei Otcheretianski2-2/+5
Some buggy APs stop sending beacons, but continue to ack our null data packets or even run some traffic. It's better not to stick connected to such an AP forever, so disconnect after some larger beacon loss threshold is crossed. Signed-off-by: Andrei Otcheretianski <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: pcie: use u32* argument to iwl_trans_get_fw_monitor_len()Johannes Berg1-1/+1
That's what we pass, and we don't want/need any negative values. Found by sparse/smatch. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-29iwlwifi: dvm: remove useless conditionJohannes Berg1-2/+3
If we're in the else branch of checking "tt->state == IWL_TI_CT_KILL" so there's no point in checking "tt->state != IWL_TI_CT_KILL" again. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>