Search Linux Wireless

Re: [PATCH 099/306] mac80211-hwsim: notify user-space about channel change.

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

 



On Mon, 2017-02-27 at 12:48 -0800, Ben Greear wrote:
> On 02/23/2017 10:36 PM, Johannes Berg wrote:
> > 
> > 
> > > +	msg_head = genlmsg_put(skb, 0, 0, &hwsim_genl_family, 0,
> > > +			       HWSIM_CMD_NOTIFY);
> > 
> > I think you should use a more specific command name.
> > 
> > > +	if (nla_put(skb, HWSIM_ATTR_ADDR_TRANSMITTER,
> > > +		    ETH_ALEN, data->addresses[1].addr))
> > > +		goto nla_put_failure;
> > 
> > and at least also add a more specific identifier like the radio ID.
> > 
> > > +	if (data->channel)
> > > +		center_freq = data->channel->center_freq;
> > > +
> > > +	if (nla_put_u32(skb, HWSIM_ATTR_FREQ, center_freq))
> > > +		goto nla_put_failure;
> > 
> > and have the full channel definition
> 
> You want chandef.center_freq1,
> 	 chandef.center_freq2,
> 	 chandef.width?
> 
> 
> Anything else?

The control channel center_freq is already there so that should be the
full chandef. I guess center_freq2 should be conditional on being non-
zero.

johannes



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

  Powered by Linux