[PATCH 5/6] wifi: ath11k: invert scan flag WMI_SCAN_FILTER_PROBE_REQ for QCA6390/WCN6855/QCA2066
Kang Yang
quic_kangyang at quicinc.com
Mon Feb 26 19:15:16 PST 2024
On 2/27/2024 4:40 AM, Jeff Johnson wrote:
> On 2/25/2024 10:02 PM, Kang Yang wrote:
>> Current ROC scan will filter probe request. But probe request is
>> necessary for P2P mode. A P2P device cannot be discovered by others if
>> it doesn't respond to others' probe request.
>>
>> So invert scan flag WMI_SCAN_FILTER_PROBE_REQ for
>> QCA6390/WCN6855/QCA2066.
>>
>> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37
>> Tested-on: QCA2066 hw2.1 PCI WLAN.HSP.1.1-03926.13-QCAHSPSWPL_V2_SILICONZ_CE-2.52297.2
>>
>> Signed-off-by: Kang Yang <quic_kangyang at quicinc.com>
>> ---
>> drivers/net/wireless/ath/ath11k/wmi.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
>> index bbccddd7d729..1dd0cbdda199 100644
>> --- a/drivers/net/wireless/ath/ath11k/wmi.c
>> +++ b/drivers/net/wireless/ath/ath11k/wmi.c
>> @@ -2317,6 +2317,9 @@ int ath11k_wmi_send_scan_start_cmd(struct ath11k *ar,
>> ether_addr_copy(cmd->mac_addr.addr, params->mac_addr.addr);
>> ether_addr_copy(cmd->mac_mask.addr, params->mac_mask.addr);
>>
>> + if (ar->ab->hw_params.single_pdev_only)
>> + cmd->scan_ctrl_flags ^= WMI_SCAN_FILTER_PROBE_REQ;
>> +
>
> Why is this being done in WMI? Ideally WMI should just be doing host to
> firmware translation, so seems this should be further up the stack, i.e.
> in ath11k_mac_op_hw_scan() / ath11k_mac_op_remain_on_channel()
>
I referred to ath10k
you are right, i will move to hw_scan().
> It also seems strange to invert the flag (which assumes a known starting
> value) instead of just explicitly setting it to the required value.
>
When work as P2P, will call remain_on_channel(), then hw_scan().
scan_ctrl_flags will set WMI_SCAN_FILTER_PROBE_REQ in
remain_on_channel(). so later should reset this flag to 0 (1 -> 0,
accept probe request).
When work as station, won't call remain_on_channel(). There is no need
to accept probe request for station(i should also explain this point),
so need to set this flag to 1 (0 -> 1).
That's why i invert this flag here, but move to hw_scan() is better.
>> ptr += sizeof(*cmd);
>>
>> len = params->num_chan * sizeof(u32);
>
More information about the ath11k
mailing list