[PATCH v2] ath11k: add signal report to mac80211 for QCA6390 and WCN6855

Kalle Valo kvalo at kernel.org
Mon Dec 20 10:27:51 PST 2021


Jeff Johnson <quic_jjohnson at quicinc.com> writes:

> On 12/15/2021 11:05 PM, Wen Gong wrote:
>> IEEE80211_HW_USES_RSS is set in ath11k, then the device uses RSS and
>> thus requires parallel RX which implies using per-CPU station statistics
>> in sta_get_last_rx_stats() of mac80211. Currently signal is only set in
>> ath11k_mgmt_rx_event(), and not set for RX data packet, then it show
>> signal as 0 for iw command easily.
>>
>> Change to get signal from firmware and report to mac80211.
>>
>> For QCA6390 and WCN6855, the rssi value is already in dbm unit, so
>> don't need to convert it again.
>>
>> Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
>> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
>>
>> Signed-off-by: Wen Gong <quic_wgong at quicinc.com>

[...]

>> @@ -7843,9 +7846,22 @@ static void ath11k_mac_op_sta_statistics(struct ieee80211_hw *hw,
>>   		ath11k_mac_put_chain_rssi(sinfo, arsta, "fw stats", true);
>>   	}
>>   -	/* TODO: Use real NF instead of default one. */
>> -	sinfo->signal = arsta->rssi_comb + ATH11K_DEFAULT_NOISE_FLOOR;
>> -	sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
>> +	signal = arsta->rssi_comb;
>> +	if (!signal &&
>> +	    arsta->arvif->vdev_type == WMI_VDEV_TYPE_STA &&
>> +	    ar->ab->hw_params.supports_rssi_stats &&
>> +	    !(ath11k_debugfs_get_fw_stats(ar, ar->pdev->pdev_id, 0,
>> +					WMI_REQUEST_VDEV_STAT)))
>
> what happens when CONFIG_ATH11K_DEBUGFS is not enabled?

I suspect it won't work.

> should the logic to get the stats be decoupled from DebugFS support?

Yes, I think it should be. But better to do it in a separate patch.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



More information about the ath11k mailing list