aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2018-10-13iwlegacy: Add a lock assertion in il4965_send_rxon_assoc()Jia-Ju Bai1-0/+2
The variables il->staging.filter_flags, rxon1->filter_flags and rxon2->filter_flags need to be protected by the mutex lock il->mutex. This patch adds a lock assertion of il->mutex to check whether this lock is held. Signed-off-by: Jia-Ju Bai <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2018-10-13brcmsmac: AP mode: update beacon when TIM changesAli MJ Al-Nasrawy2-0/+27
Beacons are not updated to reflect TIM changes. This is not compliant with power-saving client stations as the beacons do not have valid TIM and can cause the network to stall at random occasions and to have highly variable latencies. Fix it by updating beacon templates on mac80211 set_tim callback. Addresses an issue described in: https://marc.info/?i=20180911163534.21312d08%20()%20manjaro Signed-off-by: Ali MJ Al-Nasrawy <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2018-10-13mt76x0: phy: do not run calibration during channel switchLorenzo Bianconi4-26/+23
Do not perform phy/vga calibration during channel switch. Moreover remove mt76x0_agc_save and mt76x0_agc_restore routines since they are no longer necessary. Furthermore run mt76_set_channel in order to check if there are pending frames during channel switch Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: phy: align channel gain logic to mt76x2 oneLorenzo Bianconi1-17/+39
Update vga tuning algorithm to the one used in mt76x2 driver Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: introduce mt76x02_init_agc_gain routineLorenzo Bianconi3-11/+14
Add mt76x02_init_agc_gain routine in mt76x02-lib moudule in order to be reused by mt76x0 for vga initalization Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: move mt76x02_phy_adjust_vga_gain in mt76/mt76x02_phy.cLorenzo Bianconi3-20/+24
Move mt76x02_phy_adjust_vga_gain routine in mt76x02-lib module in order to be reused by mt76x0 driver for vga calibration Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: move rssi_gain_thresh routines in mt76x02-lib moduleLorenzo Bianconi2-28/+28
Move mt76x2_get_rssi_gain_thresh and mt76x2_get_low_rssi_gain_thresh routines in mt76x02-lib module in order to be reused by mt76x0 driver for dynamic vga calibration Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: phy: add phy/vco temperature compensationLorenzo Bianconi2-26/+25
Introduce phy/vco temperature calibration. Moreover fix configuration of register 67 on bank0 during temperature reading and use mt76_poll utility routine to poll core34 register. Furthermore temperature compensation needs to be disabled if the device supports tssi compensation. This issue has never been hit since temperature reading is not actually used by usb code. Fixes: 10de7a8b4ab9 ("mt76x0: phy files") Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: eeprom: introduce mt76x0_tssi_enabled routineLorenzo Bianconi7-27/+33
Add mt76x0_tssi_enabled in order to check if tssi compensation is enabled since mt76x0 condition differs from mt76x2 one. Moreover move back mt76x02_temp_tx_alc_enabled and mt76x02_tssi_enabled routines in mt76x2/eeprom.h since they are mt76x2 specific Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: phy: update set_channel for mt76x0e devicesLorenzo Bianconi1-5/+13
Do not run mt76x0_vco_cal and mt76x0_bbp_set_bw routines and configure MT_TX_SW_CFG0 register for pcie devices in mt76x0_phy_set_channel function. Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: pci: introduce mt76x0_phy_calirate routineLorenzo Bianconi4-3/+55
Add mt76x0_phy_calirate routine in order to perform phy calibration for mt76x0e devices. Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: pci: rename mt76x0_phy_calibrateLorenzo Bianconi1-2/+2
Rename mt76x0_phy_calibrate routine in mt76x0_phy_calibration_work in order to not collide with calibration routine for mt76x0e Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: move mt76x02_phy_set_band in mt76x02-lib moduleLorenzo Bianconi7-35/+25
Move mt76x02_phy_set_band routine in mt76x02_phy.c since it is shared between mt76x0 and mt76x2 drivers and remove duplicated code Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: move mt76x02_phy_set_bw in mt76x02-lib moduleLorenzo Bianconi7-57/+30
Move mt76x02_phy_set_bw routine in mt76x02_phy.c since it is shared between mt76x0 and mt76x2 drivers and remove duplicated code Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: phy: remove channel parameter from mt76x0_phy_set_chan_bbp_paramsLorenzo Bianconi1-2/+2
Remove unused channel parameter from mt76x0_phy_set_chan_bbp_params routine signature Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: phy: fix restore phase in mt76x0_phy_recalibrate_after_assocLorenzo Bianconi1-4/+3
Fix restore value configured in MT_BBP(IBI, 9) register in mt76x0_phy_recalibrate_after_assoc routine. Fixes: 10de7a8b4ab9 ("mt76x0: phy files") Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: mt76x0e: another fix for the external PA current settingFelix Fietkau1-10/+3
- Use the register number define instead of a magic value - Fix inverted bit test (override needs to be applied if the bit is not set) Fixes: 2b2cb40bcd7d ("mt76x0: pci: add hw initialization at bootstrap") Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: pci: fix set external PA I/O currentYueHaibing1-3/+3
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/mediatek/mt76/mt76x0/pci.c: In function 'mt76x0e_register_device': drivers/net/wireless/mediatek/mt76/mt76x0/pci.c:107:8: warning: variable 'data' set but not used [-Wunused-but-set-variable] It seems correct value to write is 'data' Fixes: 2b2cb40bcd7d ("mt76x0: pci: add hw initialization at bootstrap") Acked-by: Lorenzo Bianconi <[email protected]> Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: do not store aggregation sequence number for null-data framesFelix Fietkau1-1/+2
Fixes a rare corner case where a BlockAckReq might get the wrong sequence number. Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: remove dma.hStanislaw Gruszka1-126/+0
dma.h is not used any longer. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: reserve enough room for USB tx skbsStanislaw Gruszka3-17/+8
Reserve enough room for USB skb, so we don not need to check the room every time we send frame. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: pci: add mt76x0_register_device in mt76x0e_register_deviceLorenzo Bianconi1-1/+19
Run mt76x0_register_device routine in mt76x0e_register_device in order to register the device to the mac80211 layer. Moreover init mt76_driver_ops data structure and register interrupt line Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: disable ldpc coding for mt76x0 devicesLorenzo Bianconi2-43/+41
Disable ldpc coding for mt76x0 devices. Morover remove mt76x02_mac_fill_txwi routine since it is used just in mt76x02_mac_write_txwi Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: pci: add missing mac80211 callbacksLorenzo Bianconi1-1/+10
Add missing mac80211 callbacks in mt76x0e_ops data structure Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: pci: report firmware version using ethtoolLorenzo Bianconi1-0/+1
Report via ethtool fw_ver and build_ver members of mt76x02_fw_header data structure similarly to what is reported in the syslog Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: use mt76x02_dev instead of mt76_dev in mt76x02_eeprom.cLorenzo Bianconi15-124/+112
Use mt76x02_dev data structure as reference in mt76x02_eeprom.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: use mt76x02_dev instead of mt76_dev in mt76x02_txrx.cLorenzo Bianconi4-18/+16
Use mt76x02_dev data structure as reference in mt76x02_txrx.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: use mt76x02_dev instead of mt76_dev in mt76x02_mac.cLorenzo Bianconi14-110/+111
Use mt76x02_dev data structure as reference in mt76x02_mac.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: use mt76x02_dev instead of mt76_dev in mt76x02_usb_mcu.cLorenzo Bianconi4-27/+24
Use mt76x02_dev data structure as reference in mt76x02_usb_mcu.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: use mt76x02_dev instead of mt76_dev in mt76x02_util.cLorenzo Bianconi5-73/+77
Use mt76x02_dev data structure as reference in mt76x02_util.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: use mt76x02_dev instead of mt76_dev in mt76x02_phy.cLorenzo Bianconi7-59/+56
Use mt76x02_dev data structure as reference in mt76x02_phy.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: use mt76x02_dev instead of mt76_dev in mt76x02_mcu.cLorenzo Bianconi12-92/+86
Use mt76x02_dev data structure as reference in mt76x02_mcu.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: phy: fix bank check in mt76x0_rf_csr_{wr,rr}Lorenzo Bianconi1-2/+2
Fix typo in bank check in mt76x0_rf_csr_{wr,rr} routines. This issue has never been hit since mt76x0_rf_csr_{wr,rr} are actually used just by pci code Fixes: 10de7a8b4ab9 ("mt76x0: phy files") Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: use bus helper to identify rf access methodStanislaw Gruszka1-2/+6
Use mt76_is_usb() to identify RF access method instead of MT76_STATE_MCU_RUNNING flag and add warning since MCU has to be initialized before we can access RF registers via MCU. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: correct RF reg pairs write for PCIeStanislaw Gruszka1-3/+16
We have to use RF CSR method for PCIe. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76: allow to identify busStanislaw Gruszka3-0/+11
Add helpers to identify bus type. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: correct RF access via RF_CSR register.Stanislaw Gruszka2-6/+4
PCIe version don't use MCU for RF registers access. We need to correct RF CSR method to support up to 127 RF registers. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13mt76x0: print BBP version only for debugStanislaw Gruszka1-1/+1
Use dev_dbg to print BBP version. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2018-10-13rtlwifi: rtl8821ae: replace _rtl8821ae_mrate_idx_to_arfr_id with generic versionColin Ian King1-70/+1
Function _rtl8821ae_mrate_idx_to_arfr_id is functionally identical to the generic version rtl_mrate_idx_to_arfr_id, so remove _rtl8821ae_mrate_idx_to_arfr_id and use the generic one instead. This also fixes a missing break statement found by CoverityScan in _rtl8821ae_mrate_idx_to_arfr_id, namely: CID#1167237 ("Missing break in switch") Thanks to Joe Perches for spotting this when I submitted an earlier patch. Fixes: 3c05bedb5fef ("Staging: rtl8812ae: Add Realtek 8821 PCI WIFI driver") Signed-off-by: Colin Ian King <[email protected]> ACKed-by: Larry Finger <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2018-10-13iwlwifi: mvm: check return value of rs_rate_from_ucode_rate()Luca Coelho1-5/+19
The rs_rate_from_ucode_rate() function may return -EINVAL if the rate is invalid, but none of the callsites check for the error, potentially making us access arrays with index IWL_RATE_INVALID, which is larger than the arrays, causing an out-of-bounds access. This will trigger KASAN warnings, such as the one reported in the bugzilla issue mentioned below. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=200659 Cc: [email protected] Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2018-10-13Merge tag 'iwlwifi-next-for-kalle-2018-10-12' of ↵Kalle Valo13-831/+825
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Fourth set of iwlwifi patches intended for 4.20 * Support for a new scan type; * Clean-up in the queue handling code; * A few bug fixes;
2018-10-13change semantics of ldisc ->compat_ioctl()Al Viro4-86/+0
First of all, make it return int. Returning long when native method had never allowed that is ridiculous and inconvenient. More importantly, change the caller; if ldisc ->compat_ioctl() is NULL or returns -ENOIOCTLCMD, tty_compat_ioctl() will try to feed cmd and compat_ptr(arg) to ldisc's native ->ioctl(). That simplifies ->compat_ioctl() instances quite a bit - they only need to deal with ioctls that are neither generic tty ones (those would get shunted off to tty_ioctl()) nor simple compat pointer ones. Note that something like TCFLSH won't reach ->compat_ioctl(), even if ldisc ->ioctl() does handle it - it will be recognized earlier and passed to tty_ioctl() (and ultimately - ldisc ->ioctl()). For many ldiscs it means that NULL ->compat_ioctl() does the right thing. Those where it won't serve (see e.g. n_r3964.c) are also easily dealt with - we need to handle the numeric-argument ioctls (calling the native instance) and, if such would exist, the ioctls that need layout conversion, etc. All in-tree ldiscs dealt with. Signed-off-by: Al Viro <[email protected]>
2018-10-12Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller9-52/+47
Conflicts were easy to resolve using immediate context mostly, except the cls_u32.c one where I simply too the entire HEAD chunk. Signed-off-by: David S. Miller <[email protected]>
2018-10-12net: hns3: Resume promisc mode and vlan filter status after loopback testJian Shen1-1/+9
This patch resumes promisc mode and vlan filter status after loopback test. Fixes: 3b75c3df599d ("net: hns3: net: hns3: Add support for IFF_ALLMULTI flag") Signed-off-by: Jian Shen <[email protected]> Signed-off-by: Salil Mehta <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2018-10-12net: hns3: Resume promisc mode and vlan filter status after resetJian Shen1-1/+5
This patch resumes promisc mode and vlan filter status after reset. Signed-off-by: Jian Shen <[email protected]> Signed-off-by: Salil Mehta <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2018-10-12net: hns3: Enable promisc mode when mac vlan table is fullJian Shen4-12/+89
Currently, the driver does nothing when mac vlan table is full. In this case, the packet with new mac address will be dropped by hardware. This patch adds check for the result of sync mac address, and enable promisc mode when mac vlan table is full. Furtherly, disable vlan filter when enable promisc by user command. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Jian Shen <[email protected]> Signed-off-by: Salil Mehta <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2018-10-12Merge tag 'mac80211-next-for-davem-2018-10-12' of ↵David S. Miller1-10/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Highlights: * merge net-next, so I can finish the hwsim workqueue removal * fix TXQ NULL pointer issue that was reported multiple times * minstrel cleanups from Felix * simplify lib80211 code by not using skcipher, note that this will conflict with the crypto tree (and this new code here should be used) * use new netlink policy validation in nl80211 * fix up SAE (part of WPA3) in client-mode * FTM responder support in the stack ==================== Signed-off-by: David S. Miller <[email protected]>
2018-10-12net: fddi: skfp: Remove unused macros 'PNMI_GET_ID' and 'PNMI_SET_ID'YueHaibing1-8/+0
The two PNMI macros are never used Signed-off-by: YueHaibing <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2018-10-12net: cdc_ncm: remove set but not used variable 'ctx'YueHaibing1-3/+0
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/usb/cdc_ncm.c: In function 'cdc_ncm_status': drivers/net/usb/cdc_ncm.c:1603:22: warning: variable 'ctx' set but not used [-Wunused-but-set-variable] struct cdc_ncm_ctx *ctx; It not used any more after commit fa83dbeee558 ("net: cdc_ncm: remove redundant "disconnected" flag") Signed-off-by: YueHaibing <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2018-10-12Merge tag 'mmc-v4.19-rc7' of ↵Greg Kroah-Hartman1-0/+4
git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Ulf writes: "MMC core: - Avoid fragile multiblock reads for the last sector in SPI mode WIFI/SDIO: - libertas: Fixup suspend sequence for the SDIO card" * tag 'mmc-v4.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: libertas: call into generic suspend code before turning off power mmc: block: avoid multiblock reads for the last sector in SPI mode