Search Linux Wireless

Re: [PATCH V4 1/3] nl80211: add support for setting fixed HE rate/gi/ltf

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

 



On Mon, 2020-05-04 at 12:20 +0200, John Crispin wrote:
> 
> * properly make use the iftype_data array

questionable? ;)
 
> +/**
> + * ieee80211_get_he_cap - return the first he_cap that we find for a sband
> + * @sband: the sband that we want to check for HE support
> + *
> + * Return: return a valid he_cap or NULL
> + */
> +static inline const struct ieee80211_sta_he_cap *
> +ieee80211_get_he_cap(const struct ieee80211_supported_band *sband)

So this returns an ... arbitrary one basically.

> +static bool he_set_mcs_mask(struct genl_info *info,
> +			    struct ieee80211_supported_band *sband,
> +			    struct nl80211_txrate_he *txrate,
> +			    u16 mcs[NL80211_HE_NSS_MAX])
> +{
> +	const struct ieee80211_sta_he_cap *he_cap;
> +	u16 tx_mcs_mask[NL80211_HE_NSS_MAX] = {};
> +	u16 tx_mcs_map = 0;
> +	u8 i;
> +
> +	he_cap = ieee80211_get_he_cap(sband);

and here you use it

But! In all the cases where you actually get here, you should have a
netdev. So you also know the correct type, and don't have to pick an
arbitrary one.

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