[OpenWrt-Devel] [PATCH] iwinfo: Check DFS support before enabling DFS channels

Krishna Chaitanya chaitanya.mgit at gmail.com
Sun Jan 15 14:40:21 EST 2017


On Sun, Jan 15, 2017 at 6:35 PM, Chaitanya Tata
<chaitanya.mgit at gmail.com> wrote:
>
> Before enabling the DFS channels looks for support of DFS
> in interface combinations, NO_IR and DFS flags.
>
> Currently BW level checks are not supported.
>
> Tested-by: Tushar Jobanputra <Tushar.Jobanputra at imgtec.com>
> Signed-off-by: Chaitanya Tata <Chaitanya.Tata at imgtec.com>
> ---
> Fix signed tag.
> ---
>  iwinfo_nl80211.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++------
>  1 file changed, 59 insertions(+), 6 deletions(-)
>
> diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
> index 63b70d5..d8d2670 100644
> --- a/iwinfo_nl80211.c
> +++ b/iwinfo_nl80211.c
> @@ -2404,20 +2404,71 @@ static int nl80211_get_scanlist(const char *ifname, char *buf, int *len)
>         return -1;
>  }
>
> +char *channel_width_name(enum nl80211_chan_width width)
> +{
> +       switch (width) {
> +       case NL80211_CHAN_WIDTH_20_NOHT:
> +               return "20 MHz (no HT)";
> +       case NL80211_CHAN_WIDTH_20:
> +               return "20 MHz";
> +       case NL80211_CHAN_WIDTH_40:
> +               return "40 MHz";
> +       case NL80211_CHAN_WIDTH_80:
> +               return "80 MHz";
> +       case NL80211_CHAN_WIDTH_80P80:
> +               return "80+80 MHz";
> +       case NL80211_CHAN_WIDTH_160:
> +               return "160 MHz";
> +       default:
> +               return "unknown";
> +       }
> +}
> +

I just realized that i am not using this function, it was left over
from debug prints.

>
>         nla_for_each_nested(band, attr[NL80211_ATTR_WIPHY_BANDS], bands_remain)
>         {
> +               struct nlattr *is_ir,*is_dfs;
Technically this should be is_no_ir?

Will await further comments and then submit a V2.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list