summaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorAvraham Stern <avraham.stern@intel.com>2017-04-26 03:58:47 -0400
committerJohannes Berg <johannes.berg@intel.com>2017-04-28 06:28:45 -0400
commite38a017bf080d47376db340e94b9c2ffc47eb9b4 (patch)
tree7e017a6ec85701cb8e32a16097c981b86c68b6ab /net/mac80211/util.c
parent29ce6ecbb83c9185d76e3a7c340c9702d2a54961 (diff)
mac80211: Add support for BSS max idle period element
Parse the BSS max idle period element and set the BSS configuration accordingly so the driver can use this information to configure the max idle period and to use protected management frames for keep alive when required. The BSS max idle period element is defined in IEEE802.11-2016, section 9.4.2.79 Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 4a5414481b78..bfc28053639b 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -828,6 +828,7 @@ u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
828 case WLAN_EID_EXT_CAPABILITY: 828 case WLAN_EID_EXT_CAPABILITY:
829 case WLAN_EID_CHAN_SWITCH_TIMING: 829 case WLAN_EID_CHAN_SWITCH_TIMING:
830 case WLAN_EID_LINK_ID: 830 case WLAN_EID_LINK_ID:
831 case WLAN_EID_BSS_MAX_IDLE_PERIOD:
831 /* 832 /*
832 * not listing WLAN_EID_CHANNEL_SWITCH_WRAPPER -- it seems possible 833 * not listing WLAN_EID_CHANNEL_SWITCH_WRAPPER -- it seems possible
833 * that if the content gets bigger it might be needed more than once 834 * that if the content gets bigger it might be needed more than once
@@ -1089,6 +1090,10 @@ u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
1089 else 1090 else
1090 elem_parse_failed = true; 1091 elem_parse_failed = true;
1091 break; 1092 break;
1093 case WLAN_EID_BSS_MAX_IDLE_PERIOD:
1094 if (elen >= sizeof(*elems->max_idle_period_ie))
1095 elems->max_idle_period_ie = (void *)pos;
1096 break;
1092 default: 1097 default:
1093 break; 1098 break;
1094 } 1099 }
@@ -1983,6 +1988,10 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1983 if (sdata->u.mgd.have_beacon) 1988 if (sdata->u.mgd.have_beacon)
1984 changed |= BSS_CHANGED_BEACON_INFO; 1989 changed |= BSS_CHANGED_BEACON_INFO;
1985 1990
1991 if (sdata->vif.bss_conf.max_idle_period ||
1992 sdata->vif.bss_conf.protected_keep_alive)
1993 changed |= BSS_CHANGED_KEEP_ALIVE;
1994
1986 sdata_lock(sdata); 1995 sdata_lock(sdata);
1987 ieee80211_bss_info_change_notify(sdata, changed); 1996 ieee80211_bss_info_change_notify(sdata, changed);
1988 sdata_unlock(sdata); 1997 sdata_unlock(sdata);