[OpenWrt-Devel] [PATCH 2/2] add channel information for scan results

Rafał Miłecki zajec5 at gmail.com
Mon Jul 16 05:14:12 EDT 2018


On 16.07.2018 10:28, Yury Shvedov wrote:
> Sorry, some mistakes in previous patch.

Put your comments between tear line & the diff. They shouldn't go into
the repo history (log).


> Besides channel number the secondary channel for HT40 and center idx0
> and idx1 gives full understanding about real channel position and width
> on the spectra. So grab it via nl80211 and make it available in both C
> and LUA APIs, and show detailed channel information on CLI scan results.
> 
> Signed-off-by: Yury Shvedov <yshvedov at wimarksystems.com>
> ---
>   include/iwinfo.h | 19 +++++++++++++++++++
>   iwinfo_cli.c     | 10 ++++++++++
>   iwinfo_lua.c     | 11 +++++++++++
>   iwinfo_nl80211.c | 32 ++++++++++++++++++++++++++++++--
>   4 files changed, 70 insertions(+), 2 deletions(-)
> 
> diff --git a/include/iwinfo.h b/include/iwinfo.h
> index b3f5470..1559837 100644
> --- a/include/iwinfo.h
> +++ b/include/iwinfo.h
> @@ -145,6 +145,24 @@ struct iwinfo_crypto_entry {
>   	uint8_t auth_suites;
>   	uint8_t auth_algs;
>   };
> +struct iwinfo_channel_info_entry {
> +	/**
> +	 * sec_channel_offset - Secondary channel offset for HT40
> +	 *
> +	 * 0 = HT40 disabled,
> +	 * -1 = HT40 enabled, secondary channel below primary,
> +	 * 1 = HT40 enabled, secondary channel above primary
> +	 */
> +	int8_t sec_channel_offset;
> +	/**
> +	 * Center channel for VHT80
> +	 */
> +	uint8_t center_idx0;
> +	/**
> +	 * Center channel for VHT160
> +	 */
> +	uint8_t center_idx1;
> +};

Why 3 different fields for that (one per bandwidth)? It seems a single
field would work.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list