]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Use the 'no_ir' notation
authorIlan Peer <ilan.peer@intel.com>
Mon, 7 Jul 2014 11:20:54 +0000 (14:20 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 25 Oct 2014 22:23:43 +0000 (01:23 +0300)
Use the 'no_ir' notation instead of the 'passive scan' and
'no_ibss' notations to match the earlier change in nl80211.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
src/ap/hw_features.c
src/drivers/driver.h
src/drivers/driver_nl80211.c
wpa_supplicant/ctrl_iface.c
wpa_supplicant/p2p_supplicant.c

index d7d5e83f8319a1b162c80fa9b319830957c388b6..318c12a36ec9a65f7cba039c658e744dfec75857 100644 (file)
@@ -107,7 +107,8 @@ int hostapd_get_hw_features(struct hostapd_iface *iface)
 
                        /*
                         * Disable all channels that are marked not to allow
-                        * IBSS operation or active scanning.
+                        * to initiate radiation (a.k.a. passive scan and no
+                        * IBSS).
                         * Use radar channels only if the driver supports DFS.
                         */
                        if ((feature->channels[j].flag &
@@ -118,8 +119,7 @@ int hostapd_get_hw_features(struct hostapd_iface *iface)
                                    !(iface->drv_flags &
                                      WPA_DRIVER_FLAGS_DFS_OFFLOAD)) ||
                                   (feature->channels[j].flag &
-                                   (HOSTAPD_CHAN_NO_IBSS |
-                                    HOSTAPD_CHAN_PASSIVE_SCAN))) {
+                                   HOSTAPD_CHAN_NO_IR)) {
                                feature->channels[j].flag |=
                                        HOSTAPD_CHAN_DISABLED;
                        }
@@ -958,12 +958,10 @@ static int hostapd_is_usable_chan(struct hostapd_iface *iface,
                        return 1;
 
                wpa_printf(MSG_DEBUG,
-                          "%schannel [%i] (%i) is disabled for use in AP mode, flags: 0x%x%s%s%s",
+                          "%schannel [%i] (%i) is disabled for use in AP mode, flags: 0x%x%s%s",
                           primary ? "" : "Configured HT40 secondary ",
                           i, chan->chan, chan->flag,
-                          chan->flag & HOSTAPD_CHAN_NO_IBSS ? " NO-IBSS" : "",
-                          chan->flag & HOSTAPD_CHAN_PASSIVE_SCAN ?
-                          " PASSIVE-SCAN" : "",
+                          chan->flag & HOSTAPD_CHAN_NO_IR ? " NO-IR" : "",
                           chan->flag & HOSTAPD_CHAN_RADAR ? " RADAR" : "");
        }
 
index 081db0d0de138e6b3b6302047946664d9a7cd3a9..09283054ace29b870c67f5536ed595c5a4b21ea0 100644 (file)
@@ -23,8 +23,7 @@
 #include "utils/list.h"
 
 #define HOSTAPD_CHAN_DISABLED 0x00000001
-#define HOSTAPD_CHAN_PASSIVE_SCAN 0x00000002
-#define HOSTAPD_CHAN_NO_IBSS 0x00000004
+#define HOSTAPD_CHAN_NO_IR 0x00000002
 #define HOSTAPD_CHAN_RADAR 0x00000008
 #define HOSTAPD_CHAN_HT40PLUS 0x00000010
 #define HOSTAPD_CHAN_HT40MINUS 0x00000020
index dff089fc441f6d69de8056bdb9f23e5329b2af1b..a256fd1fafbe9a734f6b1c45dea7ac9215db9f29 100644 (file)
@@ -6672,7 +6672,7 @@ static void phy_info_freq(struct hostapd_hw_modes *mode,
        if (tb_freq[NL80211_FREQUENCY_ATTR_DISABLED])
                chan->flag |= HOSTAPD_CHAN_DISABLED;
        if (tb_freq[NL80211_FREQUENCY_ATTR_NO_IR])
-               chan->flag |= HOSTAPD_CHAN_PASSIVE_SCAN | HOSTAPD_CHAN_NO_IBSS;
+               chan->flag |= HOSTAPD_CHAN_NO_IR;
        if (tb_freq[NL80211_FREQUENCY_ATTR_RADAR])
                chan->flag |= HOSTAPD_CHAN_RADAR;
 
index 8cee4bfa7f0d3862c553f6f2fab38837617dd49f..42d969f9b4a545602306ccbcb3620fb713eb9195 100644 (file)
@@ -3387,8 +3387,8 @@ static int ctrl_iface_get_capability_freq(struct wpa_supplicant *wpa_s,
                                continue;
                        ret = os_snprintf(pos, end - pos, " %d = %d MHz%s%s\n",
                                          chnl[i].chan, chnl[i].freq,
-                                         chnl[i].flag & HOSTAPD_CHAN_NO_IBSS ?
-                                         " (NO_IBSS)" : "",
+                                         chnl[i].flag & HOSTAPD_CHAN_NO_IR ?
+                                         " (NO_IR)" : "",
                                          chnl[i].flag & HOSTAPD_CHAN_RADAR ?
                                          " (DFS)" : "");
 
index 0a197b6ed4fdec0a24fea9d72f590efbc1356b41..e8edf647b6ff0c2fd08d60eb3fd3ddb88beca715 100644 (file)
@@ -3513,7 +3513,7 @@ static struct hostapd_hw_modes * get_mode(struct hostapd_hw_modes *modes,
 
 
 enum chan_allowed {
-       NOT_ALLOWED, PASSIVE_ONLY, ALLOWED
+       NOT_ALLOWED, NO_IR, ALLOWED
 };
 
 static int has_channel(struct wpa_global *global,
@@ -3535,10 +3535,8 @@ static int has_channel(struct wpa_global *global,
                            (HOSTAPD_CHAN_DISABLED |
                             HOSTAPD_CHAN_RADAR))
                                return NOT_ALLOWED;
-                       if (mode->channels[i].flag &
-                           (HOSTAPD_CHAN_PASSIVE_SCAN |
-                            HOSTAPD_CHAN_NO_IBSS))
-                               return PASSIVE_ONLY;
+                       if (mode->channels[i].flag & HOSTAPD_CHAN_NO_IR)
+                               return NO_IR;
                        return ALLOWED;
                }
        }
@@ -3627,8 +3625,8 @@ static enum chan_allowed wpas_p2p_verify_80mhz(struct wpa_supplicant *wpa_s,
                res = has_channel(wpa_s->global, mode, adj_chan, &flags);
                if (res == NOT_ALLOWED)
                        return NOT_ALLOWED;
-               if (res == PASSIVE_ONLY)
-                       ret = PASSIVE_ONLY;
+               if (res == NO_IR)
+                       ret = NO_IR;
 
                if (i == 0 && !(flags & HOSTAPD_CHAN_VHT_10_70))
                        return NOT_ALLOWED;
@@ -3666,8 +3664,8 @@ static enum chan_allowed wpas_p2p_verify_channel(struct wpa_supplicant *wpa_s,
 
        if (res == NOT_ALLOWED || res2 == NOT_ALLOWED)
                return NOT_ALLOWED;
-       if (res == PASSIVE_ONLY || res2 == PASSIVE_ONLY)
-               return PASSIVE_ONLY;
+       if (res == NO_IR || res2 == NO_IR)
+               return NO_IR;
        return res;
 }
 
@@ -3711,7 +3709,7 @@ static int wpas_p2p_setup_channels(struct wpa_supplicant *wpa_s,
                                }
                                reg->channel[reg->channels] = ch;
                                reg->channels++;
-                       } else if (res == PASSIVE_ONLY &&
+                       } else if (res == NO_IR &&
                                   wpa_s->conf->p2p_add_cli_chan) {
                                if (cli_reg == NULL) {
                                        wpa_printf(MSG_DEBUG, "P2P: Add operating class %u (client only)",