Search Linux Wireless

Re: [PATCH v3 02/11] cfg80211: handle 6 GHz capability of new station

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2020-05-27 at 16:24 -0700, Rajkumar Manoharan wrote:
> On 2020-05-27 07:00, Johannes Berg wrote:
> > On Wed, 2020-05-13 at 12:44 -0700, Rajkumar Manoharan wrote:
> > > Handle 6 GHz HE capability while adding new station. It will be used
> > > later in mac80211 station processing.
> > 
> > This doesn't compile without the next patch.
> > 
> My bad.. I must have overlooked while splitting the patch. :(

No worries. Looks like I'm reshuffling everything anyway :)


> > > +       const struct ieee80211_he_6ghz_band_cap *he_6ghz_capa;
> > 
> > This we made just an __le16, any particular reason to have the struct?
> > It does need to be a pointer for the "no changes" case, but the struct
> > seems a bit overkill?
> > 
> Initially I thought of splitting into two u8 for a_mpdu_params and info.
> Later changed to __le16 but retained struct. Nothing else :)

Right. I even saw that we're inconsistent - in mac80211 we used a struct
too, and in cfg80211 I just did __le16 ... I'll be consistent with a
struct, I guess.

> > > @@ -2998,6 +3003,7 @@ enum nl80211_attrs {
> > >  #define NL80211_HE_MAX_CAPABILITY_LEN           54
> > >  #define NL80211_MAX_NR_CIPHER_SUITES		5
> > >  #define NL80211_MAX_NR_AKM_SUITES		2
> > > +#define NL80211_HE_6GHZ_CAPABILITY_LEN		2
> > 
> > This not, we defined it just to be a U16.

And this should probably not be defined anyway since it comes from the
spec (and we now export the policy to userspace even!) and in the policy
we can then use sizeof(struct ...).

> > > +	[NL80211_ATTR_HE_6GHZ_CAPABILITY] = {
> > > +		.type = NLA_EXACT_LEN,
> > > +		.len = NL80211_HE_6GHZ_CAPABILITY_LEN,
> > > +	},
> > 
> > This no longer exists, but I guess I'll just take our patch for the U16
> > here.

Sorry, I was confused - of course this still exists. NLA_EXACT_LEN_WARN
no longer exists since my recent rework in this area.

> >                 /* HE requires WME */
> > -               if (params.he_capa_len)
> > +               if (params.he_capa_len || params.he_6ghz_capa)
> >                         return -EINVAL;
> >         }
> > 
> Fine. One more thing. Pradeep found that 6 GHz capability is not filled 
> in set_station.
> Please handle that in your series. I'm fine with rest of the changes you 
> mentioned.
> 
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -5893,6 +5893,10 @@ static int nl80211_set_station_tdls(struct
> genl_info *info,
>                          return -EINVAL;
>          }
> 
> +       if (info->attrs[NL80211_ATTR_HE_6GHZ_CAPABILITY])
> +               params->he_6ghz_capa =
> +                       
> nla_data(info->attrs[NL80211_ATTR_HE_6GHZ_CAPABILITY]);
> +

OK, thanks!

johannes




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux