Re: [PATCH v5 15/17] mesh: do not use offchan mgmt tx on DFS

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

 



Hi again,

On Tue, May 29, 2018 at 02:39:19PM -0700, peter.oh@xxxxxxxxxxxxxxxxx wrote:
> From: Peter Oh <peter.oh@xxxxxxxxxxxxxxxxx>
> 
> Drivers don't allow mesh to use offchannel on management Tx.
> 
> Signed-off-by: Peter Oh <peter.oh@xxxxxxxxxxxxxxxxx>
> ---
>  src/drivers/driver_nl80211.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
> index 916baf7..5dbda41 100644
> --- a/src/drivers/driver_nl80211.c
> +++ b/src/drivers/driver_nl80211.c
> @@ -7165,6 +7165,7 @@ static int wpa_driver_nl80211_send_action(struct i802_bss *bss,
>  	struct wpa_driver_nl80211_data *drv = bss->drv;
>  	int ret = -1;
>  	u8 *buf;
> +	int offchanok = 1;
You'll need some more variables needed for
nl80211_get_hw_feature_data() which is now needed for
ieee80211_is_dfs(), see below.

 +      u16 num_modes, flags;
 +      struct hostapd_hw_modes *modes;
 +      u8 dfs_domain;

>  	struct ieee80211_hdr *hdr;
>  
>  	wpa_printf(MSG_DEBUG, "nl80211: Send Action frame (ifindex=%d, "
> @@ -7190,6 +7191,8 @@ static int wpa_driver_nl80211_send_action(struct i802_bss *bss,
>  		os_memset(bss->rand_addr, 0, ETH_ALEN);
>  	}
>  
> +	if (is_mesh_interface(drv->nlmode) && ieee80211_is_dfs(freq))

Instead of the line above I suggest you should use
 +      if (is_mesh_interface(drv->nlmode) &&
 +          (modes = nl80211_get_hw_feature_data(bss, &num_modes, &flags,
 +                                               &dfs_domain)) &&
 +          ieee80211_is_dfs(freq, modes, num_modes))


> +		offchanok = 0;
>  	if (is_ap_interface(drv->nlmode) &&
>  	    (!(drv->capa.flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX) ||
>  	     (int) freq == bss->freq || drv->device_ap_sme ||
> @@ -7201,7 +7204,7 @@ static int wpa_driver_nl80211_send_action(struct i802_bss *bss,
>  		ret = nl80211_send_frame_cmd(bss, freq, wait_time, buf,
>  					     24 + data_len,
>  					     &drv->send_action_cookie,
> -					     no_cck, 0, 1, NULL, 0);
> +					     no_cck, 0, offchanok, NULL, 0);
>  
>  	os_free(buf);
>  	return ret;
> -- 
> 2.7.4


Cheers


Daniel

_______________________________________________
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