Search Linux Wireless

Re: [PATCH 1/3] mac80211: allow turning TWT responder support on and off via netlink

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

 



On Fri, 2019-04-26 at 10:42 +0200, John Crispin wrote:
> 
> +++ b/net/wireless/nl80211.c
> @@ -6105,6 +6105,7 @@ static int nl80211_set_bss(struct sk_buff *skb, struct genl_info *info)
>  	params.ht_opmode = -1;
>  	params.p2p_ctwindow = -1;
>  	params.p2p_opp_ps = -1;
> +	params.twt_responder = -1;
>  
>  	if (info->attrs[NL80211_ATTR_BSS_CTS_PROT])
>  		params.use_cts_prot =
> @@ -6149,6 +6150,10 @@ static int nl80211_set_bss(struct sk_buff *skb, struct genl_info *info)
>  			return -EINVAL;
>  	}
>  
> +	if (info->attrs[NL80211_ATTR_TWT_RESPONDER])
> +		params.twt_responder =
> +		    nla_get_u8(info->attrs[NL80211_ATTR_TWT_RESPONDER]);

You need an NLA_POLICY_RANGE() policy for that attribute.

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