Re: [PATCH v2 13/22] cfg80211: handle Association Response from S1G STA

Thomas Pedersen
2020-09-21T05:52:32Z

On 2020-09-18 03:50, Johannes Berg wrote:
> On Mon, 2020-08-31 at 13:55 -0700, Thomas Pedersen wrote:
>>
>> + /* Detect whether this was an S1G Association Response and adjust IE
>> + * location accordingly.
>> + */
>> + rcu_read_lock();
>> + ies = rcu_dereference(bss->ies);
>> + if (WARN_ON(!ies)) {
>> + rcu_read_unlock();
>> + return;
>> + }
>> + s1g = cfg80211_find_ie(WLAN_EID_S1G_CAPABILITIES, ies->data,
>> ies->len);
>> + if (s1g) {
>> + cr.resp_ie = (u8 *)&mgmt->u.s1g_assoc_resp.variable;
>> + cr.resp_ie_len =
>> + len - offsetof(struct ieee80211_mgmt,
>> + u.s1g_assoc_resp.variable);
>> + }
>> + rcu_read_unlock();
>
> That ... is rather strange?
>
> Why not check bss->channel->band?

Thanks! That saves a lot of work :)

--
thomas