On 16 January 2015 at 11:55, Johannes Berg <[email protected]> wrote:
> On Fri, 2015-01-16 at 11:38 +0100, Janusz Dziedzic wrote:
>
>> +                             /* we both use VHT */
>> +                             struct ieee80211_vht_cap vhtcap_ie;
>> +                             struct ieee80211_sta_vht_cap vht_cap = 
>> sta->sta.vht_cap;
>> +
>> +                             ieee80211_vht_oper_to_chandef(channel,
>> +                                                           
>> elems->vht_operation,
>> +                                                           &chandef);
>
> Ok maybe I'm missing something - but can't this erroneously configure
> the local HW to 160 MHz when it doesn't even support it, or so?
>
I will check this more. But seems chandef (sta chandef) is a local
variable here, not used by the way.
So, our chandef is form cfg80211 (sdata->u.ibss.chandef) and we don't
change this.
Orginaly this sta chandef was used to compare with ibss->chandef.

-                       if (chandef.center_freq1 !=
-                           sdata->u.ibss.chandef.center_freq1)
-                               htcap_ie.cap_info &=
-
cpu_to_le16(~IEEE80211_HT_CAP_SUP_WIDTH_20_40);

But for me this check seems as not needed, eg.
We support VHT80 and other ibss have only HT40 support - so we will
have different center_freq1 - but still could operate, while sta_add
and correct rates for sta configured.
One I think we could check here is, if our chandef and sta chandef overlap.

Anyway, I am not sure I understand your question correctly, you mean eg.
we work in VHT80 mode and other ibss join in VHT160 mode? Does it
really matter while we will use sta_add for this new V160 "station"
and configure supported rates for this station?

BR
Janusz

>> +                             memcpy(&vhtcap_ie, elems->vht_cap_elem, 
>> sizeof(vhtcap_ie));
>> +                             ieee80211_vht_cap_ie_to_sta_vht_cap(sdata, 
>> sband, &vhtcap_ie, sta);
>> +                             if (memcmp(&vht_cap, &sta->sta.vht_cap, 
>> sizeof(vht_cap)))
>> +                                             rates_updated |= true;
>
> Indentation is wrong here.
>
> johannes
>
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to