aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c9
-rw-r--r--drivers/net/wireless/mwifiex/fw.h7
-rw-r--r--drivers/net/wireless/mwifiex/ioctl.h2
-rw-r--r--drivers/net/wireless/mwifiex/uap_cmd.c22
4 files changed, 39 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 94ac40c50062..2691620393ea 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1331,6 +1331,12 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy,
1331 1331
1332 mwifiex_set_ht_params(priv, bss_cfg, params); 1332 mwifiex_set_ht_params(priv, bss_cfg, params);
1333 1333
1334 if (params->inactivity_timeout > 0) {
1335 /* sta_ao_timer/ps_sta_ao_timer is in unit of 100ms */
1336 bss_cfg->sta_ao_timer = 10 * params->inactivity_timeout;
1337 bss_cfg->ps_sta_ao_timer = 10 * params->inactivity_timeout;
1338 }
1339
1334 if (mwifiex_send_cmd_sync(priv, HostCmd_CMD_UAP_BSS_STOP, 1340 if (mwifiex_send_cmd_sync(priv, HostCmd_CMD_UAP_BSS_STOP,
1335 HostCmd_ACT_GEN_SET, 0, NULL)) { 1341 HostCmd_ACT_GEN_SET, 0, NULL)) {
1336 wiphy_err(wiphy, "Failed to stop the BSS\n"); 1342 wiphy_err(wiphy, "Failed to stop the BSS\n");
@@ -2229,7 +2235,8 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter)
2229 wiphy->available_antennas_tx = BIT(adapter->number_of_antenna) - 1; 2235 wiphy->available_antennas_tx = BIT(adapter->number_of_antenna) - 1;
2230 wiphy->available_antennas_rx = BIT(adapter->number_of_antenna) - 1; 2236 wiphy->available_antennas_rx = BIT(adapter->number_of_antenna) - 1;
2231 2237
2232 wiphy->features = NL80211_FEATURE_HT_IBSS; 2238 wiphy->features = NL80211_FEATURE_HT_IBSS |
2239 NL80211_FEATURE_INACTIVITY_TIMER;
2233 2240
2234 /* Reserve space for mwifiex specific private data for BSS */ 2241 /* Reserve space for mwifiex specific private data for BSS */
2235 wiphy->bss_priv_size = sizeof(struct mwifiex_bss_priv); 2242 wiphy->bss_priv_size = sizeof(struct mwifiex_bss_priv);
diff --git a/drivers/net/wireless/mwifiex/fw.h b/drivers/net/wireless/mwifiex/fw.h
index 857af0f9542c..dda588b35570 100644
--- a/drivers/net/wireless/mwifiex/fw.h
+++ b/drivers/net/wireless/mwifiex/fw.h
@@ -128,6 +128,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
128#define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 45) 128#define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 45)
129#define TLV_TYPE_UAP_BCAST_SSID (PROPRIETARY_TLV_BASE_ID + 48) 129#define TLV_TYPE_UAP_BCAST_SSID (PROPRIETARY_TLV_BASE_ID + 48)
130#define TLV_TYPE_UAP_RTS_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 51) 130#define TLV_TYPE_UAP_RTS_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 51)
131#define TLV_TYPE_UAP_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 57)
131#define TLV_TYPE_UAP_WEP_KEY (PROPRIETARY_TLV_BASE_ID + 59) 132#define TLV_TYPE_UAP_WEP_KEY (PROPRIETARY_TLV_BASE_ID + 59)
132#define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 60) 133#define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 60)
133#define TLV_TYPE_UAP_ENCRY_PROTOCOL (PROPRIETARY_TLV_BASE_ID + 64) 134#define TLV_TYPE_UAP_ENCRY_PROTOCOL (PROPRIETARY_TLV_BASE_ID + 64)
@@ -142,6 +143,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
142#define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 105) 143#define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 105)
143#define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 113) 144#define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 113)
144#define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 114) 145#define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 114)
146#define TLV_TYPE_UAP_PS_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 123)
145#define TLV_TYPE_PWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 145) 147#define TLV_TYPE_PWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 145)
146#define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 146) 148#define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 146)
147 149
@@ -1344,6 +1346,11 @@ struct host_cmd_tlv_channel_band {
1344 u8 channel; 1346 u8 channel;
1345} __packed; 1347} __packed;
1346 1348
1349struct host_cmd_tlv_ageout_timer {
1350 struct host_cmd_tlv tlv;
1351 __le32 sta_ao_timer;
1352} __packed;
1353
1347struct host_cmd_ds_version_ext { 1354struct host_cmd_ds_version_ext {
1348 u8 version_str_sel; 1355 u8 version_str_sel;
1349 char version_str[128]; 1356 char version_str[128];
diff --git a/drivers/net/wireless/mwifiex/ioctl.h b/drivers/net/wireless/mwifiex/ioctl.h
index 8688535e95eb..4e31c6013ebe 100644
--- a/drivers/net/wireless/mwifiex/ioctl.h
+++ b/drivers/net/wireless/mwifiex/ioctl.h
@@ -105,6 +105,8 @@ struct mwifiex_uap_bss_param {
105 struct wep_key wep_cfg[NUM_WEP_KEYS]; 105 struct wep_key wep_cfg[NUM_WEP_KEYS];
106 struct ieee80211_ht_cap ht_cap; 106 struct ieee80211_ht_cap ht_cap;
107 u8 rates[MWIFIEX_SUPPORTED_RATES]; 107 u8 rates[MWIFIEX_SUPPORTED_RATES];
108 u32 sta_ao_timer;
109 u32 ps_sta_ao_timer;
108}; 110};
109 111
110enum { 112enum {
diff --git a/drivers/net/wireless/mwifiex/uap_cmd.c b/drivers/net/wireless/mwifiex/uap_cmd.c
index 8a627d856d18..d95a2d558fcf 100644
--- a/drivers/net/wireless/mwifiex/uap_cmd.c
+++ b/drivers/net/wireless/mwifiex/uap_cmd.c
@@ -343,6 +343,7 @@ mwifiex_uap_bss_param_prepare(u8 *tlv, void *cmd_buf, u16 *param_size)
343 struct host_cmd_tlv_encrypt_protocol *encrypt_protocol; 343 struct host_cmd_tlv_encrypt_protocol *encrypt_protocol;
344 struct host_cmd_tlv_auth_type *auth_type; 344 struct host_cmd_tlv_auth_type *auth_type;
345 struct host_cmd_tlv_rates *tlv_rates; 345 struct host_cmd_tlv_rates *tlv_rates;
346 struct host_cmd_tlv_ageout_timer *ao_timer, *ps_ao_timer;
346 struct mwifiex_ie_types_htcap *htcap; 347 struct mwifiex_ie_types_htcap *htcap;
347 struct mwifiex_uap_bss_param *bss_cfg = cmd_buf; 348 struct mwifiex_uap_bss_param *bss_cfg = cmd_buf;
348 int i; 349 int i;
@@ -497,6 +498,27 @@ mwifiex_uap_bss_param_prepare(u8 *tlv, void *cmd_buf, u16 *param_size)
497 tlv += sizeof(struct mwifiex_ie_types_htcap); 498 tlv += sizeof(struct mwifiex_ie_types_htcap);
498 } 499 }
499 500
501 if (bss_cfg->sta_ao_timer) {
502 ao_timer = (struct host_cmd_tlv_ageout_timer *)tlv;
503 ao_timer->tlv.type = cpu_to_le16(TLV_TYPE_UAP_AO_TIMER);
504 ao_timer->tlv.len = cpu_to_le16(sizeof(*ao_timer) -
505 sizeof(struct host_cmd_tlv));
506 ao_timer->sta_ao_timer = cpu_to_le32(bss_cfg->sta_ao_timer);
507 cmd_size += sizeof(*ao_timer);
508 tlv += sizeof(*ao_timer);
509 }
510
511 if (bss_cfg->ps_sta_ao_timer) {
512 ps_ao_timer = (struct host_cmd_tlv_ageout_timer *)tlv;
513 ps_ao_timer->tlv.type = cpu_to_le16(TLV_TYPE_UAP_PS_AO_TIMER);
514 ps_ao_timer->tlv.len = cpu_to_le16(sizeof(*ps_ao_timer) -
515 sizeof(struct host_cmd_tlv));
516 ps_ao_timer->sta_ao_timer =
517 cpu_to_le32(bss_cfg->ps_sta_ao_timer);
518 cmd_size += sizeof(*ps_ao_timer);
519 tlv += sizeof(*ps_ao_timer);
520 }
521
500 *param_size = cmd_size; 522 *param_size = cmd_size;
501 523
502 return 0; 524 return 0;