Linux wireless drivers development
 help / color / mirror / Atom feed
* unicast probe response bssid changed by "wifi: mac80211: do link->MLD address translation on RX"
@ 2022-09-14  3:13 Wen Gong
  2022-09-28 15:15 ` Wen Gong
  2022-10-19  9:35 ` wifi: mac80211: " Wen Gong
  0 siblings, 2 replies; 5+ messages in thread
From: Wen Gong @ 2022-09-14  3:13 UTC (permalink / raw)
  To: Johannes Berg, linux-wireless; +Cc: ath11k

Hi Johannes,

The mac addr of unicast rx packet all changed to the MLD address by 
below patch.
Now the probe presponse which is unicast packet is also changed mac 
address here.
I found bssid which is the MLD address of my test AP in cfg80211_get_bss().
For example, if the AP has 2 mlo links, link 1 is 5 GHz band, link 2 is 
2.4 GHz band,
then the 2 probe reponse will be changed to a same one.
seems we should skip probe presponse for the mac address change here, right?

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?id=42fb9148c078004d07b4c39bd7b1086b6165780c
wifi: mac80211: do link->MLD address translation on RX


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: unicast probe response bssid changed by "wifi: mac80211: do link->MLD address translation on RX"
  2022-09-14  3:13 unicast probe response bssid changed by "wifi: mac80211: do link->MLD address translation on RX" Wen Gong
@ 2022-09-28 15:15 ` Wen Gong
  2022-10-19  9:35 ` wifi: mac80211: " Wen Gong
  1 sibling, 0 replies; 5+ messages in thread
From: Wen Gong @ 2022-09-28 15:15 UTC (permalink / raw)
  To: Johannes Berg, linux-wireless; +Cc: ath11k

Hi Johannes,

May I get your comment about this?

On 9/14/2022 11:13 AM, Wen Gong wrote:
> Hi Johannes,
>
> The mac addr of unicast rx packet all changed to the MLD address by 
> below patch.
> Now the probe presponse which is unicast packet is also changed mac 
> address here.
> I found bssid which is the MLD address of my test AP in 
> cfg80211_get_bss().
> For example, if the AP has 2 mlo links, link 1 is 5 GHz band, link 2 
> is 2.4 GHz band,
> then the 2 probe reponse will be changed to a same one.
> seems we should skip probe presponse for the mac address change here, 
> right?
>
> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?id=42fb9148c078004d07b4c39bd7b1086b6165780c 
>
> wifi: mac80211: do link->MLD address translation on RX
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* wifi: mac80211: Re: unicast probe response bssid changed by "wifi: mac80211: do link->MLD address translation on RX"
  2022-09-14  3:13 unicast probe response bssid changed by "wifi: mac80211: do link->MLD address translation on RX" Wen Gong
  2022-09-28 15:15 ` Wen Gong
@ 2022-10-19  9:35 ` Wen Gong
  2022-10-19  9:38   ` Johannes Berg
  1 sibling, 1 reply; 5+ messages in thread
From: Wen Gong @ 2022-10-19  9:35 UTC (permalink / raw)
  To: Johannes Berg, linux-wireless; +Cc: ath11k, ath12k

On 9/14/2022 11:13 AM, Wen Gong wrote:
> Hi Johannes,
>
> The mac addr of unicast rx packet all changed to the MLD address by 
> below patch.
> Now the probe presponse which is unicast packet is also changed mac 
> address here.
> I found bssid which is the MLD address of my test AP in 
> cfg80211_get_bss().
> For example, if the AP has 2 mlo links, link 1 is 5 GHz band, link 2 
> is 2.4 GHz band,
> then the 2 probe reponse will be changed to a same one.
> seems we should skip probe presponse for the mac address change here, 
> right?
>
> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?id=42fb9148c078004d07b4c39bd7b1086b6165780c 
>
> wifi: mac80211: do link->MLD address translation on RX
>
Hi Johannes,

May I get your comment about this?

I did below change in my local test to workaround the issue.

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index a57811372027..eaff5353520a 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -4858,7 +4858,8 @@ static bool ieee80211_prepare_and_rx_handle(struct 
ieee80211_rx_data *rx,
          shwt->hwtstamp = skb_hwtstamps(skb)->hwtstamp;
      }

-    if (unlikely(link_sta)) {
+    if (unlikely(link_sta) &&
+        !(ieee80211_is_probe_resp(hdr->frame_control))) {
          /* translate to MLD addresses */
          if (ether_addr_equal(link->conf->addr, hdr->addr1))
              ether_addr_copy(hdr->addr1, rx->sdata->vif.addr);


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: wifi: mac80211: Re: unicast probe response bssid changed by "wifi: mac80211: do link->MLD address translation on RX"
  2022-10-19  9:35 ` wifi: mac80211: " Wen Gong
@ 2022-10-19  9:38   ` Johannes Berg
  2022-10-19  9:40     ` Wen Gong
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2022-10-19  9:38 UTC (permalink / raw)
  To: Wen Gong, linux-wireless; +Cc: ath11k, ath12k

On Wed, 2022-10-19 at 17:35 +0800, Wen Gong wrote:
> On 9/14/2022 11:13 AM, Wen Gong wrote:
> > Hi Johannes,
> > 
> > The mac addr of unicast rx packet all changed to the MLD address by 
> > below patch.
> > Now the probe presponse which is unicast packet is also changed mac 
> > address here.
> > I found bssid which is the MLD address of my test AP in 
> > cfg80211_get_bss().
> > For example, if the AP has 2 mlo links, link 1 is 5 GHz band, link 2 
> > is 2.4 GHz band,
> > then the 2 probe reponse will be changed to a same one.
> > seems we should skip probe presponse for the mac address change here, 
> > right?
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?id=42fb9148c078004d07b4c39bd7b1086b6165780c 
> > 
> > wifi: mac80211: do link->MLD address translation on RX
> > 
> Hi Johannes,
> 
> May I get your comment about this?

Yes I've actually seen this issue as well.

> I did below change in my local test to workaround the issue.
> 
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index a57811372027..eaff5353520a 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -4858,7 +4858,8 @@ static bool ieee80211_prepare_and_rx_handle(struct 
> ieee80211_rx_data *rx,
>           shwt->hwtstamp = skb_hwtstamps(skb)->hwtstamp;
>       }
> 
> -    if (unlikely(link_sta)) {
> +    if (unlikely(link_sta) &&
> +        !(ieee80211_is_probe_resp(hdr->frame_control))) {
>           /* translate to MLD addresses */
> 

Maybe it should also be for beacons or so?

johannes

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: wifi: mac80211: Re: unicast probe response bssid changed by "wifi: mac80211: do link->MLD address translation on RX"
  2022-10-19  9:38   ` Johannes Berg
@ 2022-10-19  9:40     ` Wen Gong
  0 siblings, 0 replies; 5+ messages in thread
From: Wen Gong @ 2022-10-19  9:40 UTC (permalink / raw)
  To: Johannes Berg, linux-wireless; +Cc: ath11k, ath12k

On 10/19/2022 5:38 PM, Johannes Berg wrote:
> On Wed, 2022-10-19 at 17:35 +0800, Wen Gong wrote:
>> On 9/14/2022 11:13 AM, Wen Gong wrote:
>>> Hi Johannes,
>>>
>>> The mac addr of unicast rx packet all changed to the MLD address by
>>> below patch.
>>> Now the probe presponse which is unicast packet is also changed mac
>>> address here.
>>> I found bssid which is the MLD address of my test AP in
>>> cfg80211_get_bss().
>>> For example, if the AP has 2 mlo links, link 1 is 5 GHz band, link 2
>>> is 2.4 GHz band,
>>> then the 2 probe reponse will be changed to a same one.
>>> seems we should skip probe presponse for the mac address change here,
>>> right?
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?id=42fb9148c078004d07b4c39bd7b1086b6165780c
>>>
>>> wifi: mac80211: do link->MLD address translation on RX
>>>
>> Hi Johannes,
>>
>> May I get your comment about this?
> Yes I've actually seen this issue as well.
>
>> I did below change in my local test to workaround the issue.
>>
>> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
>> index a57811372027..eaff5353520a 100644
>> --- a/net/mac80211/rx.c
>> +++ b/net/mac80211/rx.c
>> @@ -4858,7 +4858,8 @@ static bool ieee80211_prepare_and_rx_handle(struct
>> ieee80211_rx_data *rx,
>>            shwt->hwtstamp = skb_hwtstamps(skb)->hwtstamp;
>>        }
>>
>> -    if (unlikely(link_sta)) {
>> +    if (unlikely(link_sta) &&
>> +        !(ieee80211_is_probe_resp(hdr->frame_control))) {
>>            /* translate to MLD addresses */
>>
> Maybe it should also be for beacons or so?
>
> johannes
Yes, it should also for beacons.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-19 11:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-14  3:13 unicast probe response bssid changed by "wifi: mac80211: do link->MLD address translation on RX" Wen Gong
2022-09-28 15:15 ` Wen Gong
2022-10-19  9:35 ` wifi: mac80211: " Wen Gong
2022-10-19  9:38   ` Johannes Berg
2022-10-19  9:40     ` Wen Gong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox