aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2020-09-29net: ionic: Remove WARN_ON(in_interrupt()).Sebastian Andrzej Siewior1-4/+0
in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. In this case the check covers only parts of the contexts in which these functions cannot be called. It fails to detect preemption or interrupt disabled invocations. As the functions which are invoked from ionic_adminq_post() and ionic_dev_cmd_wait() contain a broad variety of checks (always enabled or debug option dependent) which cover all invalid conditions already, there is no point in having inconsistent warnings in those drivers. Just remove them. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: ionic: Replace in_interrupt() usage.Sebastian Andrzej Siewior3-21/+47
The in_interrupt() usage in this driver tries to figure out which context may sleep and which context may not sleep. in_interrupt() is not really suitable as it misses both preemption disabled and interrupt disabled invocations from task context. Conditionals like that in driver code are frowned upon in general because invocations of functions from invalid contexts might not be detected as the conditional papers over it. ionic_lif_addr() and _ionoc_lif_rx_mode() can be called from: 1) ->ndo_set_rx_mode() which is under netif_addr_lock_bh()) so it must not sleep. 2) Init and setup functions which are in fully preemptible task context. ionic_link_status_check_request() has two call paths: 1) NAPI which obviously cannot sleep 2) Setup which is again fully preemptible task context Add arguments which convey the execution context to the affected functions and let the callers provide the context instead of letting the functions deduce it. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: intel: Remove in_interrupt() warningsSebastian Andrzej Siewior8-13/+0
in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. In this case the checks cover only parts of the contexts in which these functions cannot be called. They fail to detect preemption or interrupt disabled invocations. As the functions which are invoked from the various places contain already a broad variety of checks (always enabled or debug option dependent) cover all invalid conditions already, there is no point in having inconsistent warnings in those drivers. Just remove them. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Alexander Duyck <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: fec_mpc52xx: Replace in_interrupt() usageSebastian Andrzej Siewior1-5/+5
The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. mpc52xx_fec_stop() uses in_interrupt() to check if it is safe to sleep. All callers run in well defined contexts. Pass an argument from the callers indicating whether it is safe to sleep. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: e100: Remove in_interrupt() usage and pointless GFP_ATOMIC allocationSebastian Andrzej Siewior1-2/+2
e100_hw_init() invokes e100_self_test() only if in_interrupt() returns false as e100_self_test() uses msleep() which requires sleepable task context. The in_interrupt() check is incomplete because in_interrupt() cannot catch callers from contexts which have just preemption or interrupts disabled. e100_hw_init() is invoked from: - e100_loopback_test() which clearly is sleepable task context as the function uses msleep() itself. - e100_up() which clearly is sleepable task context as well because it invokes e100_alloc_cbs() abd request_irq() which both require sleepable task context due to GFP_KERNEL allocations and mutex_lock() operations. Remove the pointless in_interrupt() check. As a side effect of this analysis it turned out that e100_rx_alloc_list() which is only invoked from e100_loopback_test() and e100_up() pointlessly uses a GFP_ATOMIC allocation. The next invoked function e100_alloc_cbs() is using GFP_KERNEL already. Change the allocation mode in e100_rx_alloc_list() to GFP_KERNEL as well. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: cxbg4: Remove pointless in_interrupt() checkThomas Gleixner1-3/+0
t4_sge_stop() is only ever called from task context and the in_interrupt() check is presumably a leftover from copying t3_sge_stop(). Aside of in_interrupt() being deprecated because it's not providing what it claims to provide, this check would paper over illegitimate callers. The functions invoked from t4_sge_stop() contain already warnings to catch invocations from invalid contexts. Remove it. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: cxgb3: Cleanup in_interrupt() usageThomas Gleixner3-18/+29
t3_sge_stop() is called from task context and from error handlers in interrupt context. It relies on in_interrupt() to differentiate the contexts. in_interrupt() is deprecated as it is ill defined and does not provide what it suggests. Instead of replacing it with some other construct, simply split the function into t3_sge_stop_dma(), which can be called from any context, and t3_sge_stop() which can be only called from task context. This has the advantage that any bogus invocation of t3_sge_stop() from wrong contexts can be caught by debug kernels instead of being papered over by the conditional. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: atheros: Remove WARN_ON(in_interrupt())Thomas Gleixner3-4/+0
in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. In this case the check covers only parts of the contexts in which these functions cannot be called. It fails to detect preemption or interrupt disabled invocations. As the functions which are invoked from at*_reinit_locked() contain a broad variety of checks (always enabled or debug option dependent) which cover all invalid conditions already, there is no point in having inconsistent warnings in those drivers. Just remove them. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: caif: Use netif_rx_any_context()Sebastian Andrzej Siewior1-17/+2
The usage of in_interrupt() in non-core code is phased out. Ideally the information of the calling context should be passed by the callers or the functions be split as appropriate. cfhsi_rx_desc() and cfhsi_rx_pld() use in_interrupt() to distinguish if they should use netif_rx() or netif_rx_ni() for receiving packets. The attempt to consolidate the code by passing an arguemnt or by distangling it failed due lack of knowledge about this driver and because the call chains are hard to follow. As a stop gap use netif_rx_any_context() which invokes the correct code path depending on context and confines the in_interrupt() usage to core code. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: caif: Remove unused caif SPI driverThomas Gleixner4-1151/+0
While chasing in_interrupt() (ab)use in drivers it turned out that the caif_spi driver has never been in use since the driver was merged 10 years ago. There never was any matching code which provides a platform device. The driver has not seen any update (asided of treewide changes and cleanups) since 8 years and the maintainers vanished from the planet. So analysing the potential contexts and the (in)correctness of in_interrupt() usage is just a pointless exercise. Remove the cruft. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: enic: Cure the enic api locking trainwreckThomas Gleixner3-6/+28
enic_dev_wait() has a BUG_ON(in_interrupt()). Chasing the callers of enic_dev_wait() revealed the gems of enic_reset() and enic_tx_hang_reset() which are both invoked through work queues in order to be able to call rtnl_lock(). So far so good. After locking rtnl both functions acquire enic::enic_api_lock which serializes against the (ab)use from infiniband. This is where the trainwreck starts. enic::enic_api_lock is a spin_lock() which implicitly disables preemption, but both functions invoke a ton of functions under that lock which can sleep. The BUG_ON(in_interrupt()) does not trigger in that case because it can't detect the preempt disabled condition. This clearly has never been tested with any of the mandatory debug options for 7+ years, which would have caught that for sure. Cure it by adding a enic_api_busy member to struct enic, which is modified and evaluated with enic::enic_api_lock held. If enic_api_devcmd_proxy_by_index() observes enic::enic_api_busy as true, it drops enic::enic_api_lock and busy waits for enic::enic_api_busy to become false. It would be smarter to wait for a completion of that busy period, but enic_api_devcmd_proxy_by_index() is called with other spin locks held which obviously can't sleep. Remove the BUG_ON(in_interrupt()) check as well because it's incomplete and with proper debugging enabled the problem would have been caught from the debug checks in schedule_timeout(). Fixes: 0b038566c0ea ("drivers/net: enic: Add an interface for USNIC to interact with firmware") Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29cxgb4/ch_ktls: ktls stats are added at port levelRohit Maheshwari4-54/+80
All the ktls stats were at adapter level, but now changing it to port level. Fixes: 62370a4f346d ("cxgb4/chcr: Add ipv6 support and statistics") Signed-off-by: Rohit Maheshwari <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29cxgb4: Avoid log floodRohit Maheshwari1-4/+4
Changing these logs to dynamic debugs. If issue is seen, these logs can be enabled at run time. Signed-off-by: Rohit Maheshwari <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29ch_ktls: Issue if connection offload failsRohit Maheshwari2-147/+153
Since driver first return success to tls_dev_add, if req to HW is successful, but later if HW returns failure, that connection traffic fails permanently and connection status remains unknown to stack. v1->v2: - removed conn_up from all places. v2->v3: - Corrected timeout handling. Fixes: 34aba2c45024 ("cxgb4/chcr : Register to tls add and del callback") Signed-off-by: Rohit Maheshwari <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29fddi/skfp: Avoid the use of one-element arrayGustavo A. R. Silva1-1/+1
One-element arrays are being deprecated[1]. Replace the one-element array with a simple object of type u_char: 'u_char rm_pad1'[2], once it seems this is just a placeholder for padding. [1] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays [2] https://github.com/KSPP/linux/issues/86 Built-tested-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/lkml/5f72c23f.%2FkPBWcZBu+W6HKH4%[email protected]/ Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: dsa: seville: fix VCAP IS2 action widthVladimir Oltean1-1/+1
Since the actions are packed together in the action RAM, an incorrect action width means that no action except the first one would behave correctly. The tc-flower offload has probably not been tested on this hardware since its introduction. Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: dsa: felix: fix incorrect action offsets for VCAP IS2Vladimir Oltean1-6/+6
The port mask width was larger than the actual number of ports, and therefore, all fields following this one were also shifted by the number of excess bits. But the driver doesn't use the REW_OP, SMAC_REPLACE_ENA or ACL_ID bits from the action vector, so the bug was inconsequential. Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: hns3: dump tqp enable status in debugfsGuangbin Huang3-2/+25
Adds debugfs to dump tqp enable status. Signed-off-by: Guangbin Huang <[email protected]> Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: hns3: debugfs add new command to query device specificationsGuangbin Huang1-0/+28
In order to query specifications of the device, add a new debugfs command "dev spec" to do that. Signed-off-by: Guangbin Huang <[email protected]> Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: hns3: remove unused code in hns3_self_test()Guojia Liao1-7/+2
NETIF_F_HW_VLAN_CTAG_FILTER is not set in netdev->hw_feature, but set in netdev->features. So the handler of NETIF_F_HW_VLAN_CTAG_FILTER in hns3_self_test() is always true, remove it. Signed-off-by: Guojia Liao <[email protected]> Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: hns3: Add RoCE VF reset supportHuazhong Tan2-0/+51
Add RoCE VF client reset support by notifying the RoCE VF client when hns3 VF is resetting and adding a interface to query whether CMDQ is ready to work. Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: hns3: add UDP segmentation offload supportHuazhong Tan1-3/+17
Add support for UDP segmentation offload to the HNS3 driver when the device can do it. Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: hns3: rename trace event hns3_over_8bdHuazhong Tan2-3/+3
Since the maximun BD number may not be 8 now, so rename hns3_over_8bd() to hns3_over_max_bd(). Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: hns3: replace macro HNS3_MAX_NON_TSO_BD_NUMHuazhong Tan2-22/+31
Currently, the driver is able to query the device's specifications, which includes the maximum BD number of non TSO packet, so replace macro HNS3_MAX_NON_TSO_BD_NUM with the queried value, and rewrite macro HNS3_MAX_NON_TSO_SIZE whose value depends on the the maximum BD number of non TSO packet. Also, add a new parameter max_non_tso_bd_num to function hns3_tx_bd_num() and hns3_skb_need_linearized(), then they can get the maximum BD number of non TSO packet from the caller instead of calculating by themself, The note of hns3_skb_need_linearized() should be update as well. Signed-off-by: Huazhong Tan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29octeontx2-af: add parser support for NAT-T-ESPKiran Kumar K2-29/+65
Add support for NAT-T-ESP to KPU parser configuration. NAT ESP is a UDP based protocol. So move ESP to LE so that both UDP and ESP can be extracted. Signed-off-by: Kiran Kumar K <[email protected]> Acked-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29octeontx2-af: optimize parsing of IPv6 fragmentsAbhijit Ayarekar1-40/+40
IPv6 fragmented packet may not contain completed layer 4 information. So stop KPU parsing after setting ipv6 fragmentation flag. Signed-off-by: Abhijit Ayarekar <[email protected]> Acked-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29octeontx2-af: Add IPv6 fields to default MKEXVidhya Vidhyaraman1-0/+5
Added some IPv6 protocol fields to the default MKEX profile. They include everything from the beginning of IP header and up to source address. The pattern occupies full KW2 in MCAM entry. Only one out of two LD registers for this protocol is used. Signed-off-by: Vidhya Vidhyaraman <[email protected]> Acked-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29octeontx2-af: fix Extended DSA and eDSA parsingSatha Rao1-3/+3
KPU profile interpret Extended DSA and eDSA by looking source dev. This was incorrect and it restricts to use few source device ids and also created confusion while parsing regular DSA tag. With below patch lookup was based on bit 12 of Word0. This is always zero for DSA tag and it should be one for Extended DSA and eDSA. Signed-off-by: Satha Rao <[email protected]> Acked-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29octeontx2-af: add parser support for Forward DSAHariprasad Kelam2-0/+145
Marvell Prestera switches supports distributed switch architecture by inserting Forward DSA tag of 4 bytes right after ethernet SMAC. This tag don't have a tpid field. This patch provides parser and extraction support for the same. Default ldata extraction profile added for FDSA such that Src_port is extracted and placed inplace of vlanid field. Like extended DSA and eDSA tags,a special PKIND of 62 is used for this tag. Signed-off-by: Hariprasad Kelam <[email protected]> Acked-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29octeontx2-af: cleanup KPU config dataStanislaw Kardach5-144/+301
Refactor KPU related NPC code gathering all configuration data in a structured format and putting it in one place (npc_profile.h). This increases readability and makes it easier to extend the profile configuration (as opposed to jumping between multiple header and source files). To do this: * Gather all KPU profile related data into a single adapter struct. * Convert the built-in MKEX definition to a structured one to streamline the MKEX loading. * Convert LT default register configuration into a structure, keeping default protocol settings in same file where identifiers for those protocols are defined. * Add a single point for KPU profile loading, so that its source may change in the future once proper interfaces for loading such config are in place. Signed-off-by: Stanislaw Kardach <[email protected]> Acked-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29octeontx2-af: fix LD CUSTOM LTYPE aliasingStanislaw Kardach1-2/+2
Since LD contains LTYPE definitions tweaked toward efficient NIX_AF_RX_FLOW_KEY_ALG(0..31)_FIELD(0..4) usage, the original location of NPC_LT_LD_CUSTOM0/1 was aliased with MPLS_IN_* definitions. Moving custom frame to value 6 and 7 removes the aliasing at the cost of custom frames being also considered when TCP/UDP RSS algo is configured. However since the goal of CUSTOM frames is to classify them to a separate set of RQs, this cost is acceptable. Signed-off-by: Stanislaw Kardach <[email protected]> Acked-by: Sunil Goutham <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29net: phy: realtek: fix rtl8211e rx/tx delay configWilly Liu1-15/+16
There are two chip pins named TXDLY and RXDLY which actually adds the 2ns delays to TXC and RXC for TXD/RXD latching. These two pins can config via 4.7k-ohm resistor to 3.3V hw setting, but also config via software setting (extension page 0xa4 register 0x1c bit13 12 and 11). The configuration register definitions from table 13 official PHY datasheet: PHYAD[2:0] = PHY Address AN[1:0] = Auto-Negotiation Mode = Interface Mode Select RX Delay = RX Delay TX Delay = TX Delay SELRGV = RGMII/GMII Selection This table describes how to config these hw pins via external pull-high or pull- low resistor. It is a misunderstanding that mapping it as register bits below: 8:6 = PHY Address 5:4 = Auto-Negotiation 3 = Interface Mode Select 2 = RX Delay 1 = TX Delay 0 = SELRGV So I removed these descriptions above and add related settings as below: 14 = reserved 13 = force Tx RX Delay controlled by bit12 bit11 12 = Tx Delay 11 = Rx Delay 10:0 = Test && debug settings reserved by realtek Test && debug settings are not recommend to modify by default. Fixes: f81dadbcf7fd ("net: phy: realtek: Add rtl8211e rx/tx delays config") Signed-off-by: Willy Liu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29virtio-net: don't disable guest csum when disable LROTonghao Zhang1-1/+7
Open vSwitch and Linux bridge will disable LRO of the interface when this interface added to them. Now when disable the LRO, the virtio-net csum is disable too. That drops the forwarding performance. Fixes: a02e8964eaf9 ("virtio-net: ethtool configurable LRO") Cc: Michael S. Tsirkin <[email protected]> Cc: Jason Wang <[email protected]> Cc: Willem de Bruijn <[email protected]> Signed-off-by: Tonghao Zhang <[email protected]> Acked-by: Willem de Bruijn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-29PCI/PM: Rename pci_dev.d3_delay to d3hot_delayKrzysztof Wilczyński1-1/+1
PCI devices support two variants of the D3 power state: D3hot (main power present) D3cold (main power removed). Previously struct pci_dev contained: unsigned int d3_delay; /* D3->D0 transition time in ms */ unsigned int d3cold_delay; /* D3cold->D0 transition time in ms */ "d3_delay" refers specifically to the D3hot state. Rename it to "d3hot_delay" to avoid ambiguity and align with the ACPI "_DSM for Specifying Device Readiness Durations" in the PCI Firmware spec r3.2, sec 4.6.9. There is no change to the functionality. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Krzysztof Wilczyński <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2020-09-29ath11k: Move non-fatal warn logs to dbg levelGovind Singh1-1/+1
During driver load below warn logs are printed in the console. Since driver may not implement all wmi events sent by fw and all of them are non-fatal, move this log to debug level to remove un-necessary warn message on console. [876.898735] ath11k_pci 0000:06:00.0: Unknown eventid: 0x16005 [879.283250] ath11k_pci 0000:06:00.0: Unknown eventid: 0x1d00a No functional changes. Compile tested only. Signed-off-by: Govind Singh <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-09-29ath9k: Remove set but not used variableLi Heng1-21/+0
This addresses the following gcc warning with "make W=1": drivers/net/wireless/ath/ath9k/ar9580_1p0_initvals.h:1331:18: warning: ‘ar9580_1p0_pcie_phy_clkreq_enable_L1’ defined but not used [-Wunused-const-variable=] drivers/net/wireless/ath/ath9k/ar9580_1p0_initvals.h:1338:18: warning: ‘ar9580_1p0_pcie_phy_clkreq_disable_L1’ defined but not used [-Wunused-const-variable=] drivers/net/wireless/ath/ath9k/ar9580_1p0_initvals.h:1345:18: warning: ‘ar9580_1p0_pcie_phy_pll_on_clkreq’ defined but not used [-Wunused-const-variable=] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Li Heng <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-09-29wl3501_cs: Remove unnecessary NULL checkAlex Dewar1-3/+1
In wl3501_detach(), link->priv is checked for a NULL value before being passed to free_netdev(). However, it cannot be NULL at this point as it has already been passed to other functions, so just remove the check. Addresses-Coverity: CID 710499: Null pointer dereferences (REVERSE_INULL) Signed-off-by: Alex Dewar <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-09-29wl1251/wl12xx: fix a typo in commentsWang Qing2-2/+2
Modify the comment typo: "compliment" -> "complement". Signed-off-by: Wang Qing <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-09-29qtnfmac: fix resource leaks on unsupported iftype error return pathColin Ian King1-0/+2
Currently if an unsupported iftype is detected the error return path does not free the cmd_skb leading to a resource leak. Fix this by free'ing cmd_skb. Addresses-Coverity: ("Resource leak") Fixes: 805b28c05c8e ("qtnfmac: prepare for AP_VLAN interface type support") Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-09-29rtw88: show current regulatory in tx power tableTzu-En Huang1-0/+23
In the transmit power table, it is important to know what the regulatory currently is. For different regulatories, there are different transmit power limits. Show which regulatory the driver is currently using. Signed-off-by: Tzu-En Huang <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-09-29rtw88: add dump fw crash logTzu-En Huang4-0/+81
This patch adds a function which is able to dump firmware fifo when firmware crashes. If firmware needs more than one time to dump all logs, it will set a bit called "more bit" in the header of the first log, and driver needs to set a register to inform firmware that it is ready for the next dump. Signed-off-by: Tzu-En Huang <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-09-29rtw88: add dump firmware fifo supportTzu-En Huang6-18/+85
Rtw88 currently has a function to dump reserved page section of the firmware fifo. Reserved page is just part of the firmware fifo, there are multiple sections in the firmware fifo for different usages, such as firmware rx fifo and tx fifo. This commit adds a function to check not only the reserved page section but also other parts of the firmware fifo. In addition, we need to dump firmware fifo to dump the debug log message if firmware crashes. Signed-off-by: Tzu-En Huang <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-09-29rtw88: handle and recover when firmware crashTzu-En Huang8-64/+181
This handles the situation when firmware crashes. When firmware crashes, it will send an interrupt, and driver will queue a work for recovery. In the work, driver will reset it's internal association state, which includes removing associated sta's macid, resetting vifs' states and removing keys. After resetting the driver's state, driver will call rtw_enter_ips() to force the chipset power off to reset the chip. Finally, driver calls ieee80211_restart_hw() to inform mac80211 stack to restart. Since only 8822c firmware supports this feature, the interrupt will only be triggered when 8822c chipset is loaded. Signed-off-by: Tzu-En Huang <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-09-29rtw88: increse the size of rx buffer sizeTzu-En Huang1-2/+2
The vht capability of MAX_MPDU_LENGTH is 11454 in rtw88; however, the rx buffer size for each packet is 8192. When receiving packets that are larger than rx buffer size, it will leads to rx buffer ring overflow. Signed-off-by: Tzu-En Huang <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-09-28qed/qed_ll2: Replace one-element array with flexible-array memberGustavo A. R. Silva2-14/+12
There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct qed_ll2_tx_packet, instead of a one-element array and use the struct_size() helper to calculate the size for the allocations. Commit f5823fe6897c ("qed: Add ll2 option to limit the number of bds per packet") was used as a reference point for these changes. Also, it's important to notice that flexible-array members should occur last in any structure, and structures containing such arrays and that are members of other structures, must also occur last in the containing structure. That's why _cur_completing_packet_ is now moved to the bottom in struct qed_ll2_tx_queue. _descq_mem_ and _cur_send_packet_ are also moved for unification. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Tested-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/lkml/5f707198.PA1UCZ8MYozYZYAR%[email protected]/ Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-28stmmac: intel: Adding ref clock 1us tic for LPI cntrRusaimi Amira Ruslan2-0/+18
Adding reference clock (1us tic) for all LPI timer on Intel platforms. The reference clock is derived from ptp clk. This also enables all LPI counter. Signed-off-by: Rusaimi Amira Ruslan <[email protected]> Signed-off-by: Voon Weifeng <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-28net: usb: ax88179_178a: add MCT usb 3.0 adapterWilken Gottwalt1-0/+17
Adds the driver_info and usb ids of the AX88179 based MCT U3-A9003 USB 3.0 ethernet adapter. Signed-off-by: Wilken Gottwalt <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-28net: usb: ax88179_178a: fix missing stop entry in driver_infoWilken Gottwalt1-0/+1
Adds the missing .stop entry in the Belkin driver_info structure. Fixes: e20bd60bf62a ("net: usb: asix88179_178a: Add support for the Belkin B2B128") Signed-off-by: Wilken Gottwalt <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-28net: ipa: fix two commentsAlex Elder2-2/+2
In ipa_uc_response_hdlr() a comment uses the wrong function name when it describes where a clock reference is taken. Fix this. Also fix the comment in ipa_uc_response_hdlr() to correctly refer to ipa_uc_setup(), which is where the clock reference described here is taken. Signed-off-by: Alex Elder <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-28net: ipa: rename a phandle variableAlex Elder1-4/+4
When "W=2" is supplied to the build command, we get a warning about shadowing a global declaration (of a typedef) for a variable defined in ipa_probe(). Rename the variable to get rid of the warning. Signed-off-by: Alex Elder <[email protected]> Signed-off-by: David S. Miller <[email protected]>