diff options
author | Bruno Randolf <br1@einfach.org> | 2013-02-28 23:20:24 +0000 |
---|---|---|
committer | Chirayu Desai <cdesai@cyanogenmod.org> | 2013-03-20 17:27:06 +0530 |
commit | 4d29f0d12afde09b0f84b8220c5ebeadefde9a8d (patch) | |
tree | 4f54de4b14e7a90e498a1d1a424d4dfad1421ffc /src | |
parent | a526cad2b2713d368003f40c0a23e89c5ec3d4d2 (diff) | |
download | external_wpa_supplicant_8-4d29f0d12afde09b0f84b8220c5ebeadefde9a8d.zip external_wpa_supplicant_8-4d29f0d12afde09b0f84b8220c5ebeadefde9a8d.tar.gz external_wpa_supplicant_8-4d29f0d12afde09b0f84b8220c5ebeadefde9a8d.tar.bz2 |
Add capability flag for IBSS and get_capabiliy modes
Add a driver capability flag for drivers which support IBSS mode and
set it for nl80211 drivers which have set the NL80211_IFTYPE_ADHOC.
Add a new option "modes" to "get_capability" which will return
"AP" and "IBSS" if the corresponding capability flags are set.
Change-Id: I7991ae49b6ac6bc154d4edb0b01af774f4e8522c
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/driver.h | 3 | ||||
-rw-r--r-- | src/drivers/driver_nl80211.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/driver.h b/src/drivers/driver.h index e9f926f..fc1b06f 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -834,6 +834,9 @@ struct wpa_driver_capa { #define WPA_DRIVER_FLAGS_INACTIVITY_TIMER 0x00800000 /* Driver expects user space implementation of MLME in AP mode */ #define WPA_DRIVER_FLAGS_AP_MLME 0x01000000 +/* Driver supports IBSS (Ad-hoc) mode */ +#define WPA_DRIVER_FLAGS_IBSS 0x02000000 + unsigned int flags; int max_scan_ssids; diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index b085e3b..760e55b 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -2470,6 +2470,9 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg) case NL80211_IFTYPE_AP: capa->flags |= WPA_DRIVER_FLAGS_AP; break; + case NL80211_IFTYPE_ADHOC: + capa->flags |= WPA_DRIVER_FLAGS_IBSS; + break; case NL80211_IFTYPE_P2P_GO: p2p_go_supported = 1; break; |