aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-08-20mt76: mt76x0u: do not reset radio on resumeStanislaw Gruszka1-4/+4
On some machines mt76x0u firmware can hung during resume, what result on messages like below: [ 475.480062] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 475.990066] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110 [ 475.990075] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 476.500003] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110 [ 476.500012] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 477.010046] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110 [ 477.010055] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 477.529997] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110 [ 477.530006] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 477.824907] mt76x0 1-8:1.0: Error: send MCU cmd failed:-71 [ 477.824916] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 477.825029] usb 1-8: USB disconnect, device number 6 and possible whole system freeze. This can be avoided, if we do not perform mt76x0_chip_onoff() reset. Cc: stable@vger.kernel.org Fixes: 134b2d0d1fcf ("mt76x0: init files") Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-07-16kernel: fix typos and some coding style in commentsWeitao Hou1-1/+1
fix lenght to length Link: http://lkml.kernel.org/r/20190521050937.4370-1-houweitaoo@gmail.com Signed-off-by: Weitao Hou <houweitaoo@gmail.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Colin Ian King <colin.king@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-07-08Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2-9/+38
Two cases of overlapping changes, nothing fancy. Signed-off-by: David S. Miller <davem@davemloft.net>
2019-06-30Merge tag 'mt76-for-kvalo-2019-06-27' of https://github.com/nbd168/wirelessKalle Valo47-1011/+1422
mt76 patches for 5.3 * use NAPI polling for tx cleanup on mt7603/mt7615 * various fixes for mt7615 * unify some code between mt7603 and mt7615 * fix locking issues on mt76x02 * add support for toggling edcca on mt7603 * fix reading target tx power with ext PA on mt7603/mt7615 * fix initalizing channel maximum power * fix rate control / tx status reporting issues on mt76x02/mt7603 * add support for eeprom calibration data from mtd on mt7615 * support configuring tx power on mt7615 * fix external PA support on mt76x0 * per-chain signal reporting on mt7615 * rx/tx buffer fixes for USB devices
2019-06-27mt76: usb: fix rx A-MSDU supportLorenzo Bianconi2-9/+38
Commit f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes for rx") breaks A-MSDU support. When A-MSDU is enable the device can receive frames up to q->buf_size but they will be discarded in mt76u_process_rx_entry since there is no enough room for skb_shared_info. Fix the issue reallocating the skb and copying in the linear area the first 128B of the received frames and in the frag_list the remaining part Fixes: f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes for rx") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-06-27mt76: mt7603: fix sparse warnings: warning: incorrect type in assignment (different base types)Lorenzo Bianconi1-1/+1
Fix the following sparse warning in mt7603_mcu_set_eeprom: drivers/net/wireless/mediatek/mt76/mt7603/mcu.c:376:30: sparse: warning: incorrect type in assignment (different base types) drivers/net/wireless/mediatek/mt76/mt7603/mcu.c:376:30: sparse: expected unsigned short [usertype] addr drivers/net/wireless/mediatek/mt76/mt7603/mcu.c:376:30: sparse: got restricted __le16 [usertype] Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: fix sparse warnings: warning: cast from restricted __le16Lorenzo Bianconi1-4/+2
Do not convert {tx,rx}_mcs_map to little-endian since it is already done by mac80211. This patch fix the following sparse warning: drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1497:25: sparse: warning: cast from restricted __le16 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1499:25: sparse: warning: cast from restricted __le16 Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets") Fixes: 3ca0a6f6e9df ("mt7615: mcu: use standard signature for mt7615_mcu_msg_send") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: fix sparse warnings: incorrect type in assignment (different base types)Lorenzo Bianconi1-2/+3
Fix the following sparse warning in mt7615_mcu_bss_info_ext_header: drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:728:30: sparse: sparse: incorrect type in assignment (different base types) drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:728:30: sparse: expected restricted __le32 [usertype] mbss_tsf_offset Reported-by: kbuild test robot <lkp@intel.com> Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets") Fixes: 7339fbc0caa5 ("mt7615: mcu: do not use function pointers whenever possible") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt76u: get rid of {out,in}_max_packetLorenzo Bianconi2-4/+0
Remove {out,in}_max_packet from mt76_usb data structure since they just track last usb endpoint and they are not actually used Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: move nl80211_dfs_regions in mt76_dev data structureLorenzo Bianconi7-16/+14
Move dfs region field in mt76_dev data structure since it is used by all drivers. This is a preliminary patch to add DFS support to mt7615 driver Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: remove cfg80211_chan_def from mt7615_set_channel signatureLorenzo Bianconi1-3/+2
Simplify mt7615_set_channel signature removing cfg80211_chan_def parameter since it is not actually used Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt76u: reduce rx memory footprintLorenzo Bianconi4-10/+15
Reduce rx memory footprint allocating just one SG buffer since for the moment we support just 3839B as maximal size of an A-MSDU. Introduce different SG_MAX_SIZE definitions for TX and RX sides. Moreover set q->buf_size to PAGE_SIZE even for SG case. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: update peer's bssid when state transition occursRyder Lee2-16/+16
This makes sure that the driver update peer's bssid when state transition occurs. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: fix incorrect settings in mesh modeRyder Lee1-1/+1
Fix wrong settings that will drop packets due to hardware's RX table searching flow. Fixes: f072c7ba2150 ("mt76: mt7615: enable support for mesh") Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt76x02u: fix sparse warnings: should it be static?Lorenzo Bianconi1-1/+1
Fix following sparse warnings in mt76x02_usb_core.c drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:29:6: warning: symbol 'mt76x02u_tx_complete_skb' was not declared. Should it be static? drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:37:5: warning: symbol 'mt76x02u_skb_dma_info' was not declared. Should it be static? drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:96:52: warning: restricted __le16 degrades to integer drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:74:5: warning: symbol 'mt76x02u_tx_prepare_skb' was not declared. Should it be static? drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:244:6: warning: symbol 'mt76x02u_init_beacon_config' was not declared. Should it be static? drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:262:6: warning: symbol 'mt76x02u_exit_beacon_config' was not declared. Should it be static? Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: take into account extPA when configuring tx powerLorenzo Bianconi5-9/+42
When TSSI calibration is disabled (which it means the device has been equipped with an external power amplifier) we need to refer to different eeprom fields in order to properly configure tx power Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: init per-channel target powerLorenzo Bianconi1-0/+43
Set per-channel target power as the minimum between the regulatory tx power and the value configured in the eeprom Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: add support for per-chain signal strength reportingRyder Lee2-1/+26
Fill in RX status->chain_signal to avoid empty value. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: simplify mt7615_mcu_set_sta_rec routineLorenzo Bianconi1-21/+12
Move conn_type configuration directly in mt7615_mcu_set_sta_rec and remove sta_rec_convert_vif_type since it is actually used just in mt7615_mcu_set_sta_rec Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7603: improve hardware rate switching configurationFelix Fietkau1-1/+10
Now that tx status reporting can figure out the first attempted rate, we can make switching from lower rates to higher rates more conservative. This reduces retries under bad link conditions and ensures that fallback rates get more test coverage Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7603: rework and fix tx status reportingFelix Fietkau4-41/+108
Tx status reporting on mt7603 has a number of issues: - the hardware can alter the first rate index, but it is not reported to the driver - probing is very imprecise, because it alters the per-client rate set, but only considers info->status.rates for rate selection of a single probe packet - short/long GI selection has limitations, which are not accurately reported to mac80211 - if rates are changed while packets are in flight, tx status reports for the old rate set might be processed based on the new selection This led to very suboptimal rate selection with minstrel_ht. This patch completely reworks tx status reporting to get rid of these limitations: - Store the previous and current rate set in the driver + the TSF value at the time of the switch. - Use the tx status TSF value to determine which rate set needs to be used as reference. - Report only short or long GI rates for a single status event, not a mix. - The hardware reports the last used rate index. Use it along with the retry count to figure out what rate was used for the first attempt. - Use the same retry count value for all rate slots to make this calculation work. - Derive the probe rate from the current rateset instead of the skb cb - Do not wait for a status report for the probe frame before removing the probe rate from the rate table. Do it immediately after it was referenced in a tx status report. - Use the first half of the first rate retry budget for the probe rate in order to avoid using too many retries on that rate With this patch, throughput under bad link conditions is improved significantly, and there is a lot less rate fluctuation going on. Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt76x0: fix RF frontend initialization for external PAFelix Fietkau3-6/+11
When loading EEPROM data from flash, the RF frontend settings need to be initialized from flash data. Without this, the chip loads the wrong values from its internal eFuse ROM. Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: remove key check in mt7615_mcu_set_wtbl_keyLorenzo Bianconi1-1/+1
Do not check key pointer in mt7615_mcu_set_wtbl_key since if set_key_cmd is SET_KEY, key will be always not NULL. This patch will address a false positive reported by Coverity-Scan Addresses-Coverity-ID: 1445463 ("Dereference after null check") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: remove unused variable in mt7615_mcu_set_bcnLorenzo Bianconi1-2/+2
Remove tim_len in mt7615_mcu_set_bcn since it is not actually used and ieee80211_beacon_get_tim checks if tim_length is NULL Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: fix slow performance when enable encryptionRyder Lee3-7/+12
Fix wrong WCID assignment and add RKV (RX Key of this entry is valid) flag to check if peer uses the same configuration with previous handshaking. If the configuration is mismatch, WTBL indicates a “cipher mismatch” to stop SEC decryption to prevent the packet from damage. Suggested-by: YF Luo <yf.luo@mediatek.com> Suggested-by: Yiwei Chung <yiwei.chung@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: enable support for meshRyder Lee4-7/+10
Enable NL80211_IFTYPE_MESH_POINT and update its path. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: Remove set but not used variables 'pid' and 'final_mpdu'YueHaibing2-8/+1
Fixes gcc '-Wunused-but-set-variable' warnings: drivers/net/wireless/mediatek/mt76/mt7603/mac.c: In function mt7603_fill_txs: drivers/net/wireless/mediatek/mt76/mt7603/mac.c:969:5: warning: variable pid set but not used [-Wunused-but-set-variable] drivers/net/wireless/mediatek/mt76/mt7603/mac.c:961:7: warning: variable final_mpdu set but not used [-Wunused-but-set-variable] drivers/net/wireless/mediatek/mt76/mt7615/mac.c: In function mt7615_fill_txs: drivers/net/wireless/mediatek/mt76/mt7615/mac.c:555:5: warning: variable pid set but not used [-Wunused-but-set-variable] drivers/net/wireless/mediatek/mt76/mt7615/mac.c:552:19: warning: variable final_mpdu set but not used [-Wunused-but-set-variable] They are never used, so can be removed. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: move mt76_get_rate in mt76-moduleLorenzo Bianconi4-54/+33
Move mt7603_get_rate in mac80211.c and rename it to mt76_get_rate since it is shared between mt7603 and mt7615 drivers Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: rearrange locking in mt7615_configLorenzo Bianconi1-8/+5
Since all the routines in mt7615_config grub mt76.mutex moves mutex_lock/mutex_unlock at the beginning/end of mt7615_config Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: init get_txpower mac80211 callbackLorenzo Bianconi1-0/+1
Initialize get_txpower mac80211 callback to mt76_get_txpower in order to report the configured tx power to mac80211 Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: add the capability to configure tx powerLorenzo Bianconi6-0/+140
Introduce mt7615_mcu_set_tx_power routine in order to cap tx power according to the value configured by the user Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: generalize mt76_get_txpower for 4x4:4 devicesLorenzo Bianconi1-2/+13
Genralize mt76_get_txpower routine for 4x4:4 capable devices in order to be reused in mt7615 driver Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: select wifi band according to eepromLorenzo Bianconi2-3/+30
Select supported band according to the value read from eeprom mtd/otp partition Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7615: add support for mtd eeprom parsingLorenzo Bianconi1-6/+23
Calibration data are often available on a specific mtd partition on embedded devices. Take into account eeprom calibration data if available. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: move mt76_insert_ccmp_hdr in mt76-moduleLorenzo Bianconi4-49/+26
Move mt7615_insert_ccmp_hdr in mac80211.c and rename it in mt76_insert_ccmp_hdr since it is shared between mt7603 and mt7615 drivers Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt76x02: fix tx reordering on rate control probing without a-mpduFelix Fietkau2-2/+4
To avoid aggregating rate control probing packets with other traffic, and to ensure that the probing rate gets used, probing packets get assigned a different internal queueing priority. This causes packets to be transmitted in a different order, which is compensated by the receiver side reordering. However, if A-MPDU is disabled, this reordering can become visible to upper layers on the receiver side. Disable the priority change if A-MPDU is disabled. Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt76x02: fix tx status reporting issuesFelix Fietkau4-20/+109
When the hardware falls back to lower rates for a transmit attempt, only the first status report will show the number of retries correctly. The frames that follow will report the correct final rate, but number of retries set to 0. This can cause the rate control module to vastly underestimate the number of retransmissions per rate. To fix this, we need to keep track of the initial requested tx rate per packet and pass it to the status information. For frames with tx status requested, this is simple: use the rate configured in info->control.rates[0] as reference. For no-skb tx status information, we have to encode the requested tx rate in the packet id (and make it possible to distinguish it from real packet ids). To do that, reduce the packet id field size by one bit, and use that bit to indicate packet id vs rate. This change also improves reporting by filling the status rate array with rates from first rate to final rate, taking the same steps as the hardware fallback table. This matters in corner cases like MCS8 on HT, where the fallback target is MCS0, not MCS7. Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: fix setting chan->max_powerFelix Fietkau3-7/+9
When setting chan->max_power after registering the wiphy, chan->max_reg_power needs to be used as a limit Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-27mt76: mt7603: fix reading target tx power from eepromFelix Fietkau2-0/+6
For the external PA (TSSI OFF) case, the target power needs to be read from a different location in EEPROM Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-26Merge tag 'wireless-drivers-next-for-davem-2019-06-26' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-nextDavid S. Miller2-22/+36
Kalle Valu says: ==================== wireless-drivers-next patches for 5.3 First set of patches for 5.3, but not that many patches this time. This pull request fails to compile with the tip tree due to ktime_get_boot_ns() API changes there. It should be easy for Linus to fix it in p54 driver once he pulls this, an example resolution here: https://lkml.kernel.org/r/20190625160432.533aa140@canb.auug.org.au Major changes: airo * switch to use skcipher interface p54 * support boottime in scan results rtw88 * add fast xmit support * add random mac address on scan support rt2x00 * add software watchdog to detect hangs, it's disabled by default ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2019-06-25mt76: mt7615: do not process rx packets if the device is not initializedLorenzo Bianconi1-0/+3
Fix following crash that occurs when the driver is processing rx packets while the device is not initialized yet $ rmmod mt7615e [ 67.210261] mt7615e 0000:01:00.0: Message -239 (seq 2) timeout $ modprobe mt7615e [ 72.406937] bus=0x1, slot = 0x0, irq=0x16 [ 72.436590] CPU 0 Unable to handle kernel paging request at virtual address 00000004, epc == 8eec4240, ra == 8eec41e0 [ 72.450291] mt7615e 0000:01:00.0: Firmware is not ready for download [ 72.457724] Oops[#1]: [ 72.470494] mt7615e: probe of 0000:01:00.0 failed with error -5 [ 72.474829] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.114 #0 [ 72.498702] task: 805769e0 task.stack: 80564000 [ 72.507709] $ 0 : 00000000 00000001 00000000 00000001 [ 72.518106] $ 4 : 8f704dbc 00000000 00000000 8f7046c0 [ 72.528500] $ 8 : 00000024 8045e98c 81210008 11000000 [ 72.538895] $12 : 8fc09f60 00000008 00000019 00000033 [ 72.549289] $16 : 8f704d80 e00000ff 8f0c7800 3c182406 [ 72.559684] $20 : 00000006 8ee615a0 4e000108 00000000 [ 72.570078] $24 : 0000004c 8000cf94 [ 72.580474] $28 : 80564000 8fc09e38 00000001 8eec41e0 [ 72.590869] Hi : 00000001 [ 72.596582] Lo : 00000000 [ 72.602319] epc : 8eec4240 mt7615_mac_fill_rx+0xac/0x494 [mt7615e] [ 72.614953] ra : 8eec41e0 mt7615_mac_fill_rx+0x4c/0x494 [mt7615e] [ 72.627580] Status: 11008403 KERNEL EXL IE [ 72.635899] Cause : 40800008 (ExcCode 02) [ 72.643860] BadVA : 00000004 [ 72.649573] PrId : 0001992f (MIPS 1004Kc) [ 72.657704] Modules linked in: mt7615e pppoe ppp_async pppox ppp_generic nf_conntrack_ipv6 mt76x2e mt76x2_common mt76x02_lib mt7603e mt76 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_mu] [ 72.792717] Process swapper/0 (pid: 0, threadinfo=80564000, task=805769e0, tls=00000000) [ 72.808799] Stack : 8f0c7800 00000800 8f0c7800 8032b874 00000000 40000000 8f704d80 8ee615a0 [ 72.825428] 8dc88010 00000001 8ee615e0 8eec09b0 8dc88010 8032b914 8f3aee80 80567d20 [ 72.842055] 00000000 8ee615e0 40000000 8f0c7800 00000108 8eec9944 00000000 00000000 [ 72.858682] 80508f10 80510000 00000001 80567d20 8ee615a0 00000000 00000000 8ee61c00 [ 72.875308] 8ee61c40 00000040 80610000 80580000 00000000 8ee615dc 8ee61a68 00000001 [ 72.891936] ... [ 72.896793] Call Trace: [ 72.901649] [<8eec4240>] mt7615_mac_fill_rx+0xac/0x494 [mt7615e] [ 72.913602] [<8eec09b0>] mt7615_queue_rx_skb+0xe4/0x12c [mt7615e] [ 72.925734] [<8eec9944>] mt76_dma_cleanup+0x390/0x42c [mt76] [ 72.936988] Code: ae020018 8ea20004 24030001 <94420004> a602002a 8ea20004 90420000 14430003 a2020034 [ 72.956390] [ 72.959676] ---[ end trace f176967739edb19f ]--- Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25mt76: mt76x02: fix edcca file permissionLorenzo Bianconi1-1/+1
Use 0600 as edcca file permission in mt76x02 debugfs Fixes: 643749d4a82b ("mt76: mt76x02: disable ED/CCA by default") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25mt76: mt7603: add debugfs knob to enable/disable edccaLorenzo Bianconi4-4/+39
Introduce a knob in mt7603 debugfs in order to enable/disable energy detection based on CCA thresholds Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25mt76: mt76x02: run mt76x02_edcca_init atomically in mt76_edcca_setLorenzo Bianconi3-0/+15
Run mt76x02_edcca_init atomically in mt76_edcca_set since it runs concurrently with calibration work and mt76x2_set_channel. Moreover perform phy calibration atomically Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25mt76: mt76x2: move mutex_lock inside mt76x2_set_channelLorenzo Bianconi2-17/+21
This is a preliminary patch to run mt76x02_edcca_init atomically Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25mt76: mt76x2u: remove mt76x02_edcca_init in mt76x2u_set_channelLorenzo Bianconi1-1/+0
Remove mt76x02_edcca_init in mt76x2u_set_channel since it is already run by mt76x2u_phy_channel_calibrate performing channel calibration Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25mt76: mt76x02: remove enable from mt76x02_edcca_init signatureLorenzo Bianconi8-9/+9
Remove enable parameter from mt76x02_edcca_init routine signature since it is always true Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25mt76: mt7615: add static qualifier to mt7615_rx_poll_completeLorenzo Bianconi2-2/+2
Make mt7615_rx_poll_complete static since it is used just in pci.c to initialize rx_poll_complete function pointer Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25mt76: mt7615: rearrange cleanup operations in mt7615_unregister_deviceLorenzo Bianconi1-4/+5
Cleanup tx/rx napi before releasing pending idrs. Moreover unmap txwi_cache running mt76_free_device routine Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-06-25mt76: mt7603: stop mac80211 queues before setting the channelLorenzo Bianconi1-1/+4
Suspend data transmission during channel switch Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>