aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2019-02-26ath10k: fix descriptor size in ce tx completion for WCN3990Rakesh Pillai2-2/+66
When the driver receives the tx completion of the descriptor over ce, it clears the nbytes configured for that particular descriptor. WCN3990 uses ce descriptors with 64-bit address. Currently during handling the tx completion of the descriptors, the nbytes are accessed from the descriptors using ce_desc for 32-bit targets. This will lead to clearing of memory at incorrect offset if DMA MASK is set to greater than 32 bits. Attach different ce tx copy completed handler for targets using address above 32-bit address. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01387-QCAHLSWMTPLZ-1 Signed-off-by: Rakesh Pillai <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2019-02-26mt76: add driver for MT7603E and MT7628/7688Felix Fietkau20-0/+5864
This driver is for a newer generation of 2x2 MediaTek 802.11n chipsets. MT7603E is a PCIe chip. MT7628 and MT7688 are MIPS SoC devices with built-in WLAN. MT7688 is limited to 1x1 This driver fully supports AP, station, mesh, ad-hoc and monitor mode. Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76: add driver callback for when a sta is associatedFelix Fietkau2-0/+8
MT7603 needs this to update the HT/VHT capabilities Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76: remove no longer used routine declarationsLorenzo Bianconi2-13/+5
Remove following routine declarations that are no longer used after commit cfca5f693c5d ("mt76usb: remove usb_mcu.c"): - mt76u_mcu_complete_urb - mt76u_deinit - mt76u_buf_free - mt76u_submit_urb Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76: usb: check urb->num_sgs limit in mt76u_process_rx_entryLorenzo Bianconi1-1/+1
check nsgs value is less than urb->num_sgs in mt76u_process_rx_entry in order to avoid an out-of-bound access of urb->sg array Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76: usb: simplify mt76u_tx_build_sg routineLorenzo Bianconi1-14/+3
Use skb_to_sgvec instad of skb_to_sgvec_nomark in mt76u_tx_build_sg. Remove nsgs check in mt76u_tx_build_sg since it is already performed by skb_to_sgvec Suggested-by: Felix Fietkau <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76: usb: simplify rx buffer allocationLorenzo Bianconi2-51/+27
Squash mt76u_buf_alloc_sg and mt76u_buf_alloc and remove duplicated code. Reuse mt76u_refill_rx in mt76u_buf_alloc Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76: usb: introduce mt76u_fill_bulk_urb routineLorenzo Bianconi1-19/+26
Add mt76u_fill_bulk_urb to initialize tx/rx urbs and remove duplicate code Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76: usb: fix warning in mt76u_buf_freeLorenzo Bianconi1-7/+2
Fix following static checker warning in mt76u_buf_free: drivers/net/wireless/mediatek/mt76/usb.c:372 mt76u_buf_free() warn: address of 'urb->sg[i]' is non-NULL There is no need to check sg page pointer since urb->num_sgs has been already validated in mt76u_fill_rx_sg Fixes: cb83585e1121 ("mt76: usb: fix possible memory leak in mt76u_buf_free") Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76usb: remove usb_mcu.cStanislaw Gruszka6-47/+6
Don't need separate file just for kmalloc/kfree. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76usb: use synchronous msg for mcu command responsesStanislaw Gruszka6-74/+15
Use usb_bulk_msg for reading MCU command responses. This simplify code a lot. Together with 97a3005759c ("mt76usb: allow mt76u_bulk_msg be used for reads") it also fix possible problems with rx data buffers not being aligned and contained within single page. After doing page_frag_alloc(1024) consecutive page_frag_alloc(PAGE_SIZE) will alloc PAGE_SIZE buffer at PAGE_SIZE - 1024 offset. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76usb: allow mt76u_bulk_msg be used for readsStanislaw Gruszka2-6/+10
Extend mt76u_bulk_msg() such it can be used for synchronous bulk reads. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76: mt76x02: set MT_TXOP_HLDR_TX40M_BLK_EN for mt76x2Felix Fietkau1-3/+3
It needs to be always enabled for 76x2 and conditionally enabled/disabled for 76x0. Since mt76x2_mac_stop clears this bit, ensure that it is enabled in mt76x02_edcca_init Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76: mt76x2: unify mt76x2[u]_mac_resumeFelix Fietkau6-18/+9
They are now the same and short enough to be turned into an inline function Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76: mt76x02: fix ED/CCA enabling/disablingFelix Fietkau8-16/+14
ED/CCA needs to be disable before stopping the MAC to avoid hangs from tx being blocked. It must only be enabled again after the MAC has been started again. In many places this wasn't done properly, so fix this by always clearing the relevant ED/CCA bits in mt76x2_mac_stop and set it up again after channel change or calibration is done Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76: mt76x02: issue watchdog reset on MCU request timeoutFelix Fietkau3-9/+21
MCU request timeout usually indicates that the device is no longer responsive, and it usually does not recover without a reset Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76: mt76x02: only reset beacon drift counter when enabling beaconsFelix Fietkau2-1/+3
When the timer is already running, there is no need to reset the counter, because the drift will remain the same. Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76: mt76x02: fix beacon timer issueFelix Fietkau1-3/+3
When mt76x0 and mt76x2 beacon code was unified, it changed the order in which beacon enable and beacon interval are configured. Configuring beacon enable before beacon interval can in some cases cause problems with the beacon timer, leading to clients not waking up properly from powersave mode. Fix this by changing the order back to interval first, then enable. Fixes: cc726268e4dce ("mt76: move mt76x02_bss_info_changed in mt76x02-lib module") Cc: [email protected] Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76: mt76x02: fix beacon timer drift adjustmentFelix Fietkau1-7/+7
Check the count before incrementing it to match vendor code behavior. This defers the adjustment by one more tick, which should improve accuracy Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26mt76: mt76x02: fix TSF sync modeFelix Fietkau1-1/+1
MT_BEACON_TIME_CFG_SYNC_MODE needs to be set for AP mode, according to the documentation. For other modes it should be irrelevant in this case. Signed-off-by: Felix Fietkau <[email protected]>
2019-02-24Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+1
Three conflicts, one of which, for marvell10g.c is non-trivial and requires some follow-up from Heiner or someone else. The issue is that Heiner converted the marvell10g driver over to use the generic c45 code as much as possible. However, in 'net' a bug fix appeared which makes sure that a new local mask (MDIO_AN_10GBT_CTRL_ADV_NBT_MASK) with value 0x01e0 is cleared. Signed-off-by: David S. Miller <[email protected]>
2019-02-22Merge tag 'wireless-drivers-next-for-davem-2019-02-22' of ↵David S. Miller476-10522/+8781
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 5.1 Most likely the last set of patches for 5.1. WPA3 support to ath10k and qtnfmac. FTM support to iwlwifi and ath10k. And of course other new features and bugfixes. wireless-drivers was merged due to dependency in mt76. Major changes: iwlwifi * HE radiotap * FTM (Fine Timing Measurement) initiator and responder implementation * bump supported firmware API to 46 * VHT extended NSS support * new PCI IDs for 9260 and 22000 series ath10k * change QMI interface to support the new (and backwards incompatible) interface from HL3.1 and used in recent HL2.0 branch firmware releases * support WPA3 with WCN3990 * support for mac80211 airtime fairness based on transmit rate estimation, the firmware needs to support WMI_SERVICE_PEER_STATS to enable this * report transmit airtime to mac80211 with firmwares having WMI_SERVICE_REPORT_AIRTIME feature, this to have more accurate airtime fairness based on real transmit time (instead of just estimated from transmit rate) * support Fine Timing Measurement (FTM) responder role * add dynamic VLAN support with firmware having WMI_SERVICE_PER_PACKET_SW_ENCRYPT * switch to use SPDX license identifiers ath * add new country codes for US brcmfmac * support monitor frames with the hardware/ucode header qtnfmac * enable WPA3 SAE and OWE support mt76 * beacon support for USB devices (mesh+ad-hoc only) rtlwifi * convert to use SPDX license identifiers libertas_tf * get the MAC address before registering the device ==================== Signed-off-by: David S. Miller <[email protected]>
2019-02-22Merge remote-tracking branch 'net-next/master' into mac80211-nextJohannes Berg182-3930/+4125
Merge net-next to resolve a conflict and to get the mac80211 rhashtable fixes so further patches can be applied on top. Signed-off-by: Johannes Berg <[email protected]>
2019-02-22mac80211: update HE IEs to D3.3Liad Kaufman3-39/+85
Update element names and new fields according to D3.3 of the HE spec. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2019-02-22mac80211_hwsim: propagate genlmsg_reply return codeLi RongQing1-1/+1
genlmsg_reply can fail, so propagate its return code Signed-off-by: Li RongQing <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2019-02-20iwlwifi: add new cards for 22000 and killer series and change the market nameIhab Zhaika4-48/+64
Add a few PCI ID'S for 22000 and killer series in addition to chainging the marketing name. Signed-off-by: Ihab Zhaika <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: add new card for 9260 seriesIhab Zhaika1-0/+1
Add one PCI ID for 9260 series. CC: <[email protected]> # 4.14+ Signed-off-by: Ihab Zhaika <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: dbg_ini: implement Rx fifos dumpShahar S Matityahu2-2/+134
Implement Rx fifos dump in the new dump mechanism. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: dbg_ini: implement Tx fifos dumpShahar S Matityahu4-14/+218
Implement Tx fifos dump in the new dump mechanism. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: dbg_ini: add region to fill_header handlerShahar S Matityahu1-9/+12
Add iwl_fw_ini_region_cfg region struct to fill_header handler of iwl_dump_ini_mem_ops. it is needed for future support in fifos dumping. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: dbg_ini: make fill_range handler accept generic range pointerShahar S Matityahu1-24/+29
Make fill_range handler of iwl_dump_ini_mem_ops accept a generic range pointer. It is needed for future support in fifos dumping. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: dbg_ini: make memory dump get_size handler include headersShahar S Matityahu1-49/+49
Make the get size handler of iwl_dump_ini_mem_ops include the total size of the region. It is needed for fifos dumping. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: dbg_ini: add print to iwl_dump_ini_mem in case of invalid rangeShahar S Matityahu1-2/+6
Add informative print in case the range is not available. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: dbg_ini: fix infinite time ignore consecutive dumpsShahar S Matityahu1-2/+0
The driver sets ignore_consec to -1 which is 0xffffffff in u32 so when iwl_fw_ini_trigger_on is called, it will always return false and each trigger could be used only once. Solve this by removing the assignment to -1. 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-02-20iwlwifi: mvm: add some debug data to TX pathSara Sharon2-5/+14
This helps debugging when things go wrong. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: remove redundant condition from prior alive dump flowShahar S Matityahu1-16/+0
After the FW image was loaded for the first time, fwrt->smem_cfg.num_lmacs value will no longer be zero since we don't clean it when we stop the device. So if we load the image once and then we fail on a consecutive attempt, the driver will abort any dumping. Solve this by removing the condition. It is safe to remove since when we do the actual dumping in iwl_fw_dbg_collect_sync we check that STATUS_DEVICE_ENABLED bit is still active. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: mvm: implement VHT extended NSS support in rs.cJohannes Berg1-2/+21
For non-offloaded rate control, implement VHT extended NSS support by just ignoring 160 MHz on transmit if the peer doesn't support the full NSS (2). This is pretty unlikely and gets us 160 MHz RX as well as TX in most cases, since the typical case for this workaround is 4x4 AP only doing 2x2 on 160 MHz. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: mvm: Allow retries for probe responsesIlan Peer1-1/+3
When hostapd sends a probe response, it does not request an acknowledgment on the probe response. This setting is propagated to the driver and FW from mac80211, and as a result probe responses are transmitted only once without retries. In congested environments, this reduces the likelihood for finding the AP. To overcome this, enable acknowledgment and retries for probe responses, even in case no acknowledgment is requested. In such a case the retry limit is set to 3. Signed-off-by: Ilan Peer <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: mvm: remove IWL_MVM_INIT_STATUS_REG_HW_INIT_COMPLETEJohannes Berg3-9/+2
There's no point in this, we already do everything in a nested fashion, and if we didn't we'd already crash in iwl_mvm_leds_exit() etc. Just remove the bit. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: mvm: Set TX_CMD_FLG_PROT_REQUIRE correctlyAndrei Otcheretianski1-1/+1
Previously the protection flag wasn't set on multicast frames even if the RA is unicast. Fix this by checking addr1 instead. Signed-off-by: Andrei Otcheretianski <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: mvm: support non-transmitting APSara Sharon3-2/+12
Add an option to not send beacons and probe responses. This is used for testing multiple-bssid. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: mvm: add read debugfs for he_sniffer_paramsLiad Kaufman2-2/+24
Return the AID currently set when reading this debugfs entry. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: mvm: reject new beacons when in inject modeSara Sharon3-2/+11
Verify we do not accept new beacon templates while beacon injection is active. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: iwl-drv: no need to check return value of debugfs_create functionsGreg Kroah-Hartman1-22/+0
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: Johannes Berg <[email protected]> Cc: Emmanuel Grumbach <[email protected]> Cc: Luca Coelho <[email protected]> Cc: Intel Linux Wireless <[email protected]> Cc: Kalle Valo <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: fw: no need to check return value of debugfs_create functionsGreg Kroah-Hartman2-14/+6
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: Johannes Berg <[email protected]> Cc: Emmanuel Grumbach <[email protected]> Cc: Luca Coelho <[email protected]> Cc: Intel Linux Wireless <[email protected]> Cc: Kalle Valo <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: dvm: no need to check return value of debugfs_create functionsGreg Kroah-Hartman3-50/+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: Johannes Berg <[email protected]> Cc: Emmanuel Grumbach <[email protected]> Cc: Luca Coelho <[email protected]> Cc: Intel Linux Wireless <[email protected]> Cc: Kalle Valo <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: nvm-parse: advertise IEEE80211_VHT_EXT_NSS_BW_CAPABLE in VHTJohannes Berg1-2/+5
We support this, so we should advertise it. In fact, if we don't, mac80211 will do it for us (as we advertise SUPPORTS_VHT_EXT_NSS_BW to it), but that requires a memory reallocation which is wasteful: ieee80211 phy0: copying sband (band 1) due to VHT EXT NSS BW flag Set the flag here to avoid that. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: mvm: fix error path in iwl_mvm_mac_setup_register()Johannes Berg1-6/+9
The IWL_MVM_INIT_STATUS_REG_HW_INIT_COMPLETE bit shouldn't be set, and realistically we should complete all setup before we call the ieee80211_register_hw() function. Fix this. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: nvm-parse: use struct_size() in kzalloc()Gustavo A. R. Silva1-11/+7
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]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-20iwlwifi: eeprom-parse: use struct_size() in kzalloc()Gustavo A. R. Silva1-2/+1
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]> Signed-off-by: Luca Coelho <[email protected]>