summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-06-22iwlwifi: mvm: Read acpi dsm to get unii4 enable/disable bitmap.Abhishek Naik
Read the UNII4 setting from the ACPI table and use it in the LARI_CONFIG_CHANGE_CMD accordingly. This setting allows OEMs to enable or disable UNII4, bypassing the FW defaults. Signed-off-by: Abhishek Naik <abhishek.naik@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210617100544.223090c509c4.If03cb5393607ae494041b6187bcec134d6a1e06d@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: pcie: remove TR/CR tail allocationsJohannes Berg
The TR/CR tail data are meant to be per-queue-arrays, however, we allocate them completely wrong (we have a separate allocation per queue). Looking at this more closely, it turns out that the hardware never uses these - we have a separate free list per RX queue and maintain a write pointer for that in a register, and the RX itself is indicated in the RB status (rb_stts) DMA region. Despite nothing using the tail pointers, the hardware will unconditionally access them to write updates, even when we aren't using CRs/TRs. Give it dummy values that we never use/update so it can do that without causing trouble. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210617110647.5f5764e04c46.I4d5de1929be048085767f1234a1e07b517ab6a2d@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: pcie: fix some kernel-doc commentsJohannes Berg
"ubd" is really called "used_bd", fix that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210617100544.2d4b46c656bb.Iff9ee6a7e65d439169202911dad2cbea626fb887@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: advertise broadcast TWT supportShaul Triebitz
If the firmware supports broadcast TWT (know by TLV), add the broadcast TWT HE MAC capability. Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210617100544.80fee3171b53.Idfb69643f4044ec26865d023d0c2a1d6466694aa@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: mvm: support LMR feedbackAvraham Stern
If the LMR feedback is set in the ranging request, set the corresponding flag in the fw command. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210617100544.0c00dd724f5c.I8283b95c26f4226deaea42e7be35aa9d41eb7580@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: correct HE capabilitiesJohannes Berg
The (default) HE capabilities for our devices weren't handled correctly, adjust them to match the correct capabilities of the devices. Since the device regulatory will not allow 160 MHz on 5 GHz, don't advertise this capability by default; do it only if an NVM file is being loaded that might change the regulatory parameters. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210617100544.e8d0b02ec86b.Ia6ef8cc0480d38af25e6ac45fad9fb15bdfcbc2c@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: mvm: Call NMI instead of REPLY_ERRORHarish Mitty
For IWL_DEVICE_FAMILY_22000 & greater, driver will call NMI instead of REPLY_ERROR as FW->Infra does not support this command for this family onwards. Signed-off-by: Harish Mitty <harish.mitty@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210617100544.597f4246c79d.Ia0a1bbc2e66b4e849174db685208fc2b8bd5732e@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: mvm: fix error print when session protection endsShaul Triebitz
When the session protection ends and the Driver is not associated or a beacon was not heard, the Driver prints "No beacons heard...". That's confusing for the case where not associated. Change the print when not associated to "Not associated...". Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210617100544.41a5a5a894fa.I9eabb76e7a3a7f4abbed8f2ef918f1df8e825726@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: mvm: honour firmware SMPS requestsJohannes Berg
The firmware can now request SMPS (due to thermal conditions), add some code to honour such requests and bubble them up through the stack, subject to our other SMPS constraints, e.g. from Bluetooth. Then, if the firmware requests SMPS, then we know that it supports a small extension to the PHY configuration API where a chain mask of 0 means "use 1 but pick which one yourself", so in this case we use that extension. During firmware restart, we stay in the previous state, and the FW will send us a notification at startup (only) if the temperature is below the lower or above the high threshold, to sync the state. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210617100544.85656b7684b9.I7a661a0758d070a750d3a91874d1a0f5fab9febc@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: mvm: apply RX diversity per PHY contextJohannes Berg
SMPS requests may differ per interfaces due to e.g. Bluetooth only interfering on 2.4 GHz, so if that's the case we should, in the case of multiple PHY contexts, still allow RX diversity on PHY context that have no interfaces with SMPS requests. Fix the code to pass through the PHY context in question and skip interfaces with non-matching PHY context while iterating. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210617100544.123c6b05809d.I992e3d1c6a29850d02eeec01712b5b685b963a87@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: mvm: don't request SMPS in AP modeJohannes Berg
This is not valid (in the spec) and mac80211 will soon warn on it, in addition to ignoring it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210617100544.d568df20e273.Id45ae38f9b16b3c56fa62266e3e89a1421ea07b0@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: pcie: identify the RF moduleJohannes Berg
Identify and print out the RF module to be able to identify (from logs and through debugfs) which one (and version) is present on the system. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210617100544.cd1ef97b2c04.Iad42a59902a87a50b45b9ce88705863686a83b54@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: yoyo: support region TLV version 2Mukesh Sisodiya
Region TLV version 2 now includes more data, but it is not relevant for the driver. In order to support this new version, just mask the new part out. Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210612142637.60dd4c60ab49.I44fe02af389d3ab089363bf9bde0d99a4c1ff383@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: remove duplicate iwl_ax201_cfg_qu_hr declarationJohannes Berg
This configuration struct is declared twice, remove one of the declarations. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210612142637.a08c905ec25b.Iff706f9d5b7b666e306549c419d04dcd4d81e5fd@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: pcie: remove CSR_HW_RF_ID_TYPE_CHIP_IDJohannes Berg
This is duplicated with CSR_HW_RFID_TYPE so just use the latter for less typing/shorter lines. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210612142637.00b220f4ba53.I1fe216a46e7d9c1316d681daa293064f16ff1899@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: pcie: print interrupt number, not indexJohannes Berg
Printing the interrupt index in our local array isn't very useful in an error message, print the interrupt number (as also shown in e.g. /proc/interrupts) instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210612142637.05bc5157e606.Ifb65b5ed2e5296fd8258c40c4287b5443b06d337@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: pcie: Add support for AX231 radio module with Ma devicesMatti Gottlieb
Add support for AX231 radio modules, which we call Fm. These modules can be used with the Ma family of devices and above. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210612142637.c1fdd153d686.I7ee0485c52fb429de1fe171cb6dc0ae593a26788@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: increase PNVM load timeoutLuca Coelho
The FW has a watchdog of 200ms in the PNVM load flow, so the driver should have a slightly higher timeout. Change the timeout from 100ms to 250ms. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Fixes: 70d3ca86b025 ("iwlwifi: mvm: ring the doorbell and wait for PNVM load completion") Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210612142637.ba22aec1e2be.I36bfadc28c480f4fc57266c075a79e8ea4a6934f@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: pcie: handle pcim_iomap_table() failures betterJohannes Berg
pcim_iomap_table() might return NULL, so we shouldn't unconditionally dereference the return value by taking the [0] entry. Handle this better by checking for NULL first, and then separately checking if the [0] entry is NULL. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210612142637.9aa4f0e3574a.I458b283f203d5f927f00be1bfbd4b8ebf11c5ae4@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: mvm: don't change band on bound PHY contextsJohannes Berg
When we have a P2P Device active, we attempt to only change the PHY context it uses when we get a new remain-on-channel, if the P2P Device is the only user of the PHY context. This is fine if we're switching within a band, but if we're switching bands then the switch implies a removal and re-add of the PHY context, which isn't permitted by the firmware while it's bound to an interface. Fix the code to skip the unbind/release/... cycle only if the band doesn't change (or we have old devices that can switch the band on the fly as well.) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210612142637.e9ac313f70f3.I713b9d109957df7e7d9ed0861d5377ce3f8fccd3@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: remove unused REMOTE_WAKE_CONFIG_CMD definitionsLuca Coelho
We don't use this command anymore and it is going to be removed from the FW. Remove all related definitions. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210612142637.549b282ae9a4.Iced05882d73b869e19f50e6a6e7bf9ce6cd7899b@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: mvm: fix indentation in some scan functionsLuca Coelho
Two functions had indentation mistakes which were causing sparse warnings. Fix them. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210612142637.12f3b9fea57e.I42a7556d43de78ec6387e3a699eca10482b0485d@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: mvm: pass the clock type to iwl_mvm_get_sync_time()Luca Coelho
Allow the caller to pass the clock type to iwl_mvm_get_sync_time() so callers with different needs can decide whether to use boottime or realtime. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210612142637.093f6660e69b.Ifd2328ac2130269f729c9c1bceec44ba01d79e88@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-22iwlwifi: mvm: support BIOS enable/disable for 11ax in RussiaMiri Korenblit
Read the new BIOS DSM and Pass to FW if to disable\enable 11ax for Russia according to the BIOS key. This is needed to enable OEMs to control enable/disable 11ax in Russia. Also add support for future "enable 11ax in country X" features. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210612142637.a705f7cedff8.I580f1021cabcc37e88f5ec5e9a6bbf00aae514b6@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-06-19rtl8xxxu: avoid parsing short RX packetÍñigo Huguet
One USB data buffer can contain multiple received network packets. If that's the case, they're processed this way: 1. Original buffer is cloned 2. Original buffer is trimmed to contain only the first network packet 3. This first network packet is passed to network stack 4. Cloned buffer is trimmed to eliminate the first network packet 5. Repeat with the cloned buffer until there are no more network packets inside However, if the space remaining in original buffer after the first network packet is not enough to contain at least another network packet descriptor, it is not cloned. The loop parsing this packets ended if remaining space == 0. But if the remaining space was > 0 but < packet descriptor size, another iteration of the loop was done, processing again the previous packet because cloning didn't happen. Moreover, the ownership of this packet had been passed to network stack in the previous iteration. This patch ensures that no extra iteration is done if the remaining size is not enough for one packet, and also avoid the first iteration for the same reason. Probably this doesn't happen in practice, but can happen theoretically. Signed-off-by: Íñigo Huguet <ihuguet@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210511071926.8951-1-ihuguet@redhat.com
2021-06-19rtl8xxxu: Fix device info for RTL8192EU devicesPascal Terjan
Based on 2001:3319 and 2357:0109 which I used to test the fix and 0bda:818b and 2357:0108 for which I found efuse dumps online. == 2357:0109 == === Before === Vendor: Realtek Product: \x03802.11n NI Serial: === After === Vendor: Realtek Product: 802.11n NIC Serial not available. == 2001:3319 == === Before === Vendor: Realtek Product: Wireless N Serial: no USB Adap === After === Vendor: Realtek Product: Wireless N Nano USB Adapter Serial not available. Signed-off-by: Pascal Terjan <pterjan@google.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210424172959.1559890-1-pterjan@google.com
2021-06-19Merge tag 'mt76-for-kvalo-2021-06-18' of https://github.com/nbd168/wireless ↵Kalle Valo
into pending mt76 patches for 5.14 * mt7915 MSI support * disable ASPM on mt7915 * mt7915 tx status reporting * mt7921 decap offload * driver fixes * cleanups * mt7921 runtime power management improvements * testmode improvements/fixes * runtime PM improvements
2021-06-19mt76: mt7921: allow chip reset during device restartLorenzo Bianconi
Disable chip full reset just during device probing but allow it during hw restart. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7615: set macwork timeout according to runtime-pmLorenzo Bianconi
Set macwork timeout value according to runtime-pm in order to reduce power consumption Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7663s: enable runtime-pmLorenzo Bianconi
Allow the user to enable runtime-pm for mt7663s driver Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7663s: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx pathLorenzo Bianconi
Similar to mt7663e, rely on mt76_connac_pm_ref/mt76_connac_pm_unref to check PM state and increment/decrement wake counter Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7663s: rely on pm reference countingLorenzo Bianconi
As already done for mt7921 and mt7663e, rely on pm reference counting in drv/fw_own Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: sdio: do not run mt76_txq_schedule directlyLorenzo Bianconi
In order to support runtime-pm for sdio, do not run mt76_txq_schedule directly, but schedule tx_worker instead Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7921: enable HE BFee capabilityDeren Wu
Enables HE MU/SU beamformee functionality Signed-off-by: Eric-SY Chang <Eric-SY.Chang@mediatek.com> Signed-off-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: disable TWT capabilities for the momentLorenzo Bianconi
Disable TWT REQ/RES mac capabilities since TWT is not supported yet in mt7915/mt7921. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: fix iv and CCMP header insertionRyder Lee
The iv from RXD is only for TKIP_RSC/CCMP_PN/GCMP_PN, and it needs a check for CCMP header insertion. Move mt76_cipher_type to mt76.h to reduce duplicated code. Signed-off-by: Xing Song <xing.song@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7921: fix the coredump is being truncatedSean Wang
Fix the maximum size of the coredump generated with current mt7921 firmware. Otherwise, a truncated coredump would be reported to userland via dev_coredumpv. Also, there is an additional error handling enhanced in the patch to avoid the possible invalid buffer access when the system failed to create the buffer to hold the coredump. Fixes: 0da3c795d07b ("mt76: mt7921: add coredump support") Co-developed-by: YN Chen <YN.Chen@mediatek.com> Signed-off-by: YN Chen <YN.Chen@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7921: fix kernel warning when reset on vif is not staSean Wang
ieee80211_disconnect is only called for the staton mode. [ 714.050429] WARNING: CPU: 1 PID: 382 at net/mac80211/mlme.c:2787 ieee80211_disconnect+0x108/0x118 [mac80211] [ 714.116704] Hardware name: MediaTek Asurada rev1 board (DT) [ 714.122303] Workqueue: mt76 mt7921_mac_reset_work [mt7921e] [ 714.127877] pstate: 20c00009 (nzCv daif +PAN +UAO) [ 714.132761] pc : ieee80211_disconnect+0x108/0x118 [mac80211] [ 714.138430] lr : mt7921_vif_connect_iter+0x28/0x54 [mt7921e] [ 714.144083] sp : ffffffc0107cbbd0 [ 714.147394] x29: ffffffc0107cbbd0 x28: ffffffb26c9cb928 [ 714.152706] x27: ffffffb26c9cbd98 x26: 0000000000000000 [ 714.158017] x25: 0000000000000003 x24: ffffffb26c9c9c38 [ 714.163328] x23: ffffffb26c9c9c38 x22: ffffffb26c9c8860 [ 714.168639] x21: ffffffb23b940000 x20: ffffffb26c9c8860 [ 714.173950] x19: 0000000000000001 x18: 000000000000b67e [ 714.179261] x17: 00000000064dd409 x16: ffffffd739cb28f0 [ 714.184571] x15: 0000000000000000 x14: 0000000000000227 [ 714.189881] x13: 0000000000000400 x12: ffffffd73a4eb060 [ 714.195191] x11: 0000000000000000 x10: 0000000000000000 [ 714.200502] x9 : ffffffd703a0a000 x8 : 0000000000000006 [ 714.205812] x7 : 2828282828282828 x6 : ffffffb200440396 [ 714.211122] x5 : 0000000000000000 x4 : 0000000000000004 [ 714.216432] x3 : 0000000000000000 x2 : ffffffb23b940c90 [ 714.221743] x1 : 0000000000000001 x0 : ffffffb23b940c90 [ 714.227054] Call trace: [ 714.229594] ieee80211_disconnect+0x108/0x118 [mac80211] [ 714.234913] mt7921_vif_connect_iter+0x28/0x54 [mt7921e] [ 714.240313] __iterate_interfaces+0xc4/0xdc [mac80211] [ 714.245541] ieee80211_iterate_interfaces+0x4c/0x68 [mac80211] [ 714.251381] mt7921_mac_reset_work+0x410/0x468 [mt7921e] [ 714.256696] process_one_work+0x208/0x3c8 [ 714.260706] worker_thread+0x23c/0x3e8 [ 714.264456] kthread+0x140/0x17c [ 714.267685] ret_from_fork+0x10/0x18 Fixes: 0c1ce9884607 ("mt76: mt7921: add wifi reset support") Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7921: introduce dedicated control for deep_sleepLorenzo Bianconi
Introduce ds_enable switch to fully control fw deep_sleep capability Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7921: limit txpower according to userlevel powerLorenzo Bianconi
Limit tx power for single-sku according to userlevel power. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7921: improve code readability for mt7921_update_txsLorenzo Bianconi
Introduce mt7921_update_txs routine in order to improve code readability for tx timestamp parsing/configuration. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7921: add deep sleep control to runtime-pm knobSean Wang
Add addtional the deep sleep control to runtime-pm knob to allow us to control driver switching between the full power mode and the deep sleep mode the firmware is able to support. Reviewed-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7921: enable deep sleep at runtimeSean Wang
Enable the deep sleep mode with that firmware is able to trap into the doze state at runtime to reduce the power consumption further. The deep sleep mode is not allowed in the STA state transition with the firmware to have the fast connection experience as we've done in the full power mode Reviewed-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7915: fix IEEE80211_HE_PHY_CAP7_MAX_NC for station modeRyder Lee
The value of station mode is always 0. Fixed: 00b2e16e0063 ("mt76: mt7915: add TxBF capabilities") Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: use SPDX header file comment styleTom Rix
header files should use '/* SPDX ... */ Change from c file comment syle to header style Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: add a space between comment char and SPDX tagTom Rix
checkpatch expects a space between '#' and 'SPDX...' Add a space. Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7915: improve MU stabilityRyder Lee
- Adjust starec flow since VHT MU group is only updated by starec_vht follows starec_bf settings. - Drop unnecessary MU BF checks. TX MPDU PER (Status = Success): TOT_MPDU_CNT FAIL_MPDU_CNT TX_PER WCID Rate 1 VHT_BW80_2SS_MCS7_LGI_LDPC_MUBF 114 0 0.00% VHT_BW80_2SS_MCS7_LGI_LDPC_MUBF_MU 64 0 0.00% VHT_BW80_2SS_MCS7_SGI_LDPC_MUBF 128 0 0.00% VHT_BW80_2SS_MCS7_SGI_LDPC_MUBF_MU 745 0 0.00% VHT_BW80_2SS_MCS8_LGI_LDPC_MUBF_MU 856 0 0.00% VHT_BW80_2SS_MCS8_SGI_LDPC_MUBF_MU 1430 4 0.28% VHT_BW80_2SS_MCS9_LGI_LDPC_MUBF_MU 5220 31 0.59% VHT_BW80_2SS_MCS9_LGI_LDPC_iBF 59 0 0.00% VHT_BW80_2SS_MCS9_SGI_LDPC_MUBF 64 2 3.12% VHT_BW80_2SS_MCS9_SGI_LDPC_MUBF_MU 22132 76 0.34% VHT_BW80_2SS_MCS9_SGI_LDPC_iBF 2866 1 0.03% 2 VHT_BW80_2SS_MCS7_LGI_LDPC_MUBF_MU 3781 5 0.13% VHT_BW80_2SS_MCS7_SGI_LDPC_MUBF_MU 735 0 0.00% VHT_BW80_2SS_MCS8_LGI_LDPC_MUBF_MU 1270 365 28.74% VHT_BW80_2SS_MCS8_SGI_LDPC_MUBF_MU 3420 57 1.67% VHT_BW80_2SS_MCS9_LGI_LDPC_MUBF 128 0 0.00% VHT_BW80_2SS_MCS9_LGI_LDPC_MUBF_MU 64 0 0.00% VHT_BW80_2SS_MCS9_SGI_LDPC_MUBF 191 0 0.00% VHT_BW80_2SS_MCS9_SGI_LDPC_MUBF_MU 18833 320 1.70% VHT_BW80_2SS_MCS9_SGI_LDPC_iBF 6040 0 0.00% 287 OFDM 6M Tested-by: Evelyn Tsai <evelyn.tsai@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7915: introduce mt7915_mcu_set_txbf()Ryder Lee
Use mt7915_mcu_set_txbf() to reduce global functions. This can be easily extended to support other TxBF commands in further patches. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: make mt76_update_survey() per phyRyder Lee
Reduce duplicated survey for DBDC. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-19mt76: mt7915: drop the use of repeater entries for station interfacesFelix Fietkau
There are firmware or hardware issues, which are currently causing tx hangs when attempting to use these interfaces Signed-off-by: Felix Fietkau <nbd@nbd.name>