- 26 Jan, 2021 35 commits
-
-
Felix Fietkau authored
Without this change, the start operation could potentially race against eeprom or txbf init Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Felix Fietkau authored
Do not use the RSSI values of the unavailable chain Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Ryder Lee authored
Add ht/vht implicit Tx beamforming support and enable it via debugfs. Tested-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Ryder Lee authored
This is a preliminary patch for implicit beamforming support. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
When testmode can be enabled, the start() callback would already be called, causing that txpower sku feature isn't really disabled after testmode is enabled. This patch fix the issue. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Implement continuous tx state for MT7915 NIC testmode. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
This is a preliminary patch to simplify setting state in mt7915 testmode, for adding the new continuous tx state. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Support to set a special tx state in testmode: continuous tx, which is used for sending tx without time gap. Note that continuous tx mode doesn't send real packets, instead, it's pure phy signal, and the waveform can be observed by instrument. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Add a testmode mcu command to clean up hw tx queue before a new testmode tx starts. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
If tx_time is set, calculate a new packet length based on tx time and tx rate. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Add support to calculate and apply ipg parameters in testmode for MT7915 NIC. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Split parameter settings and mcu command update in mt7915_mcu_set_tx(). This is for reusing edca update function in testmode ipg setting. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Originally, tx queued limit is set to 1000 to prevent from running out of tx token. If a new testmode tx is triggered while the previous one hasn't finished yet, we'll wait a period of time until tx_done equals to tx_queued. Normally, current queued limit can finish in 10 seconds. However, if ipg is configured to a larger value, less than 1000 packets can be done in the default timeout period, which may lead to a crash when a new testmode tx triggered. To deal with this, make tx queued limit dynamically adjusted according to ipg value. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Add attributes for setting tx inter-packet gap (ipg), duty cycle, and transmission time in testmode. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Add spatial extension (spe) index as a configurable parameter in testmode. This is used for specifically configuring TX path, such as different WF TX priority, number of antennas and spatial streams. If spe_idx is not set, TX path depends on tx_antenna_mask; otherwise, both spe_idx and tx_antenna_mask are referenced to decide TX path. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
LDPC should be set when bw is larger than 20MHz to make testmode tx work normally. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Move chainmask from driver phy to mt76_phy since it is used by all drivers. This is a preliminary patch to create a common mcu library used by mt7615 and mt7921 drivers Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Move mac_work delayed_work and mac_work_count in mt76_phy since it is used by all drivers. This is a preliminary patch to create a common mcu library used by mt7615 and mt7921 drivers Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Move per-chip testmode data to mt7615_phy, to properly support reg_backup and rx status of each band in testmode. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Acked-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Move per-chip testmode data to mt7915_phy, to properly support reg_backup and rx status of each band in testmode. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Acked-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Move testmode mtd variables to mt76_dev, since they are the same on each phy. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Acked-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Add testmode support for DBDC NICs (both MT7615D and MT7915D work). Testmode data and parameters are moved from per-dev to per-phy for maintaining the value of each band. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Acked-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
This is a preliminary patch for DBDC and ipg config support in testmode. The wmm_idx of band1 should be configured by this command to make band1 Tx work normally. Also, for setting ipg, FW needs a non-empty bss_info structure to do edca parameters update. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Acked-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Ryder Lee authored
Hardware wouldn't add LLC-SNAP when skb->data_len is 0, which causes Tx hang, so add a check to drop this kind of packet. Tested-by: Bo Jiao <bo.jiao@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Simplify mt7915_mcu_send_message routine removing unused code Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
Fix the following sparse warning in mt7915_mcu_set_radar_th routine: drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3154:17: warning: incorrect type in initializer (different base types) drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3154:17: expected unsigned int [usertype] min_pri drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3154:17: got restricted __le32 [usertype] drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3155:17: warning: incorrect type in initializer (different base types) drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3155:17: expected unsigned int [usertype] max_pri drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3155:17: got restricted __le32 [usertype] drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3162:17: warning: incorrect type in initializer (different base types) drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3162:17: expected unsigned int [usertype] min_stgpr_diff drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3162:17: got restricted __le32 [usertype] Fixes: cee236e1 ("mt76: mt7915: fix endian issues") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Shayne Chen authored
Add support for getting rf values from flash. This is used for some test purposes and products. If the mtd partition is configured in dts, driver will read from flash to init eeprom command; if not, still init it with efuse's values. An example: &slot0 { mt7915@0,0 { reg = <0x0000 0 0 0 0>; device_type = "pci"; mediatek,mtd-eeprom = <&factory 0x0000>; }; }; Acked-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Lorenzo Bianconi authored
In order to avoid races, run mt7915_configure_filter routine holding mt76 mutex Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Zheng Yongjun authored
Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Zheng Yongjun authored
Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Ryder Lee authored
Reset token in mt7615_mac_reset_work() to avoid possible leakege. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Ryder Lee authored
Reset buffering token in mt7915_mac_reset_work() to avoid possible leakege, which leads to Tx stop after mac reset. Tested-by: Bo Jiao <bo.jiao@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Ryder Lee authored
MCU expects to set WLAN_CIPHER_SUITE_CCMP and WLAN_CIPHER_SUITE_AES_CMAC at the same time, so adding an intermediate buffer for batch update. Tested-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Ryder Lee authored
This avoids the WARN_ON(1) calltrace in station mode. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
Ryder Lee authored
To avoid the warn_on() calltrace in station mode. [ 4522.024382] ieee80211_tx_dequeue+0x1258/0x1298 [mac80211] [ 4522.029868] ieee80211_beacon_get_template+0x10/0x18 [mac80211] [ 4522.035780] mt7915_mcu_add_beacon+0x2c/0x208 [mt7915e] [ 4522.040997] mt7915_mcu_get_rx_rate+0x304/0x878 [mt7915e] [ 4522.046394] ieee80211_delayed_tailroom_dec+0x158/0x180 [mac80211] [ 4522.052573] ieee80211_iterate_interfaces+0x48/0x68 [mac80211] [ 4522.058398] mt7915_mac_reset_work+0x3b4/0x630 [mt7915e] [ 4522.063704] process_one_work+0x1fc/0x390 [ 4522.067703] worker_thread+0x48/0x4d0 [ 4522.071356] kthread+0x120/0x128 Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
- 25 Jan, 2021 5 commits
-
-
Stanislaw Gruszka authored
We have already WARN_ON(!qc) for non-QOS frame on txq->sched_retry path, but we continue to process, what makes no sense since tid is not initialized. Non QOS frame should never happen when aggregation is enabled on queue, so do not process that. Patch should fix smatch warning: drivers/net/wireless/intel/iwlegacy/4965-mac.c:2822 il4965_hdl_tx() error: uninitialized symbol 'tid'. Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210119100621.439134-1-stf_xl@wp.pl
-
Lorenzo Bianconi authored
Similar to commit 0e40dbd5 ("mt7601u: process URBs in status EPROTO properly"), do not process tx URBs if marked with status set to EPROTO. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Acked-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/72392e8341aa8591c0b9962661a6ca26b1198f32.1610919534.git.lorenzo@kernel.org
-
Tony Lindgren authored
We can currently get a "command execute failure 19" error on beacon loss if the signal is weak: wlcore: Beacon loss detected. roles:0xff wlcore: Connection loss work (role_id: 0). ... wlcore: ERROR command execute failure 19 ... WARNING: CPU: 0 PID: 1552 at drivers/net/wireless/ti/wlcore/main.c:803 ... (wl12xx_queue_recovery_work.part.0 [wlcore]) (wl12xx_cmd_role_start_sta [wlcore]) (wl1271_op_bss_info_changed [wlcore]) (ieee80211_prep_connection [mac80211]) Error 19 is defined as CMD_STATUS_WRONG_NESTING from the wlcore firmware, and seems to mean that the firmware no longer wants to see the quirk handling for WLCORE_QUIRK_START_STA_FAILS done. This quirk got added with commit 18eab430 ("wlcore: workaround start_sta problem in wl12xx fw"), and it seems that this already got fixed in the firmware long time ago back in 2012 as wl18xx never had this quirk in place to start with. As we no longer even support firmware that early, to me it seems that it's safe to just drop WLCORE_QUIRK_START_STA_FAILS to fix the error. Looks like earlier firmware got disabled back in 2013 with commit 0e284c07 ("wl12xx: increase minimum singlerole firmware version required"). If it turns out we still need WLCORE_QUIRK_START_STA_FAILS with any firmware that the driver works with, we can simply revert this patch and add extra checks for firmware version used. With this fix wlcore reconnects properly after a beacon loss. Cc: Raz Bouganim <r-bouganim@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210115065613.7731-1-tony@atomide.com
-
Lorenzo Bianconi authored
Similar to mt76 driver, rely on ieee80211_rx_list in order to improve icache footprint Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Acked-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/5c72fa2dda45c1ae3f285af80c02f3db23341d85.1610580222.git.lorenzo@kernel.org
-
Chin-Yen Lee authored
The LTR mechanism enables PCIE Endpoints to report the service latency requirements and CPU will enter appropriate sleep state to save power based on the LTR value. 8723de provides two registers to config the LTR, and the original setting is too short for CPU to ente sleep state. The patch adjust the LTR setting. Signed-off-by: Chin-Yen Lee <timlee@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210113014342.3615-1-pkshih@realtek.com
-