Re: [PATCH 6/9] DFS: introduce hostapd_dfs_request_channel_switch routine

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

 



> On Mon, Dec 20, 2021 at 04:48:21PM +0100, Lorenzo Bianconi wrote:
> > This is a preliminary patch to add Channel Switch Announcement for
> > background radar detection.
> 
> > diff --git a/src/ap/dfs.c b/src/ap/dfs.c
> > @@ -940,6 +940,85 @@ int hostapd_is_dfs_chan_available(struct hostapd_iface *iface)
> >  
> > +static int hostapd_dfs_request_channel_switch(struct hostapd_iface *iface,
> 
> > +	struct hostapd_hw_modes *cmode = iface->current_mode;
> > +	int ieee80211_mode = IEEE80211_MODE_AP, err, i;
> 
> That i needs to be unsigned int (like it was in the function from which
> it was moved to here) to avoid a compiler warning.

ack, I will fix it

> 
> > +	u8 new_vht_oper_chwidth;
> 
> > +	new_vht_oper_chwidth = hostapd_get_oper_chwidth(iface->conf);
> > +	hostapd_set_oper_chwidth(iface->conf,
> > +				 hostapd_get_oper_chwidth(iface->conf));
> 
> This looks quite strange.. hostapd_dfs_start_channel_switch() used
> current_vht_oper_chwidth to store the current value from beginning of
> the function and restored it at this location. The new version in this
> helper function seems to something strange, or well, nothing. That does
> not feel correct.
> 
> >  static int hostapd_dfs_start_channel_switch(struct hostapd_iface *iface)
> >  {
> > -	unsigned int i;
> 
> That's where i was unsigned..
> 
> > -	u8 current_vht_oper_chwidth = hostapd_get_oper_chwidth(iface->conf);
> 
> And that's where the current value is picked at the beginning of
> hostapd_dfs_start_channel_switch().
> 
> > -	new_vht_oper_chwidth = hostapd_get_oper_chwidth(iface->conf);
> > -	hostapd_set_oper_chwidth(iface->conf, current_vht_oper_chwidth);
> 
> And this looks quite different compared to what was in the new helper
> function.

ack, I will fix it.

Regards,
Lorenzo

> 
> -- 
> Jouni Malinen                                            PGP id EFC895FA
> 

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux