Adding support for SIOCGIWMODE for hostapd (SoftAP).
Added support for SIOCGIWMODE which helps apps to know
the current mode of operation.
Change-Id: Ica970dc3ba0853c8f76682123834830d1ab733d0
CRs-Fixed: 535340
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c
index 205aeec..ac14932 100644
--- a/CORE/HDD/src/wlan_hdd_hostapd.c
+++ b/CORE/HDD/src/wlan_hdd_hostapd.c
@@ -3120,6 +3120,18 @@
return 0;
}
+static int iw_get_mode(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu,
+ char *extra)
+{
+ int status = 0;
+
+ wrqu->mode = IW_MODE_MASTER;
+
+ return status;
+}
+
static int iw_softap_setwpsie(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu,
@@ -3706,7 +3718,7 @@
(iw_handler) NULL, /* SIOCSIWFREQ */
(iw_handler) iw_get_ap_freq, /* SIOCGIWFREQ */
(iw_handler) NULL, /* SIOCSIWMODE */
- (iw_handler) NULL, /* SIOCGIWMODE */
+ (iw_handler) iw_get_mode, /* SIOCGIWMODE */
(iw_handler) NULL, /* SIOCSIWSENS */
(iw_handler) NULL, /* SIOCGIWSENS */
(iw_handler) NULL, /* SIOCSIWRANGE */