History

mac80211: Add RRM support to assoc request

In case of a RRM-supporting connection, in the association request frame: set the RRM capability flag, and add the required IEs.

Assaf Krauss committed 12 years ago

Commit cd2f5dd1 parent bab5ab72 files · +13 −3Browse files

Unified · Split

2 files
  1. net/mac80211/ieee80211_i.h +1 −0
  2. net/mac80211/mlme.c +12 −3
net/mac80211/ieee80211_i.h+1−0
@@ -355,6 +355,7 @@ enum ieee80211_sta_flags { · 354 unmodified lines
355355 IEEE80211_STA_DISABLE_80P80MHZ = BIT(12),
356356 IEEE80211_STA_DISABLE_160MHZ = BIT(13),
357357 IEEE80211_STA_DISABLE_WMM = BIT(14),
358+ IEEE80211_STA_ENABLE_RRM = BIT(15),
358359 };
359360
360361 struct ieee80211_mgd_auth_data {
net/mac80211/mlme.c+12−3
@@ -673,6 +673,9 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) · 672 unmodified lines
673673 (local->hw.flags & IEEE80211_HW_SPECTRUM_MGMT))
674674 capab |= WLAN_CAPABILITY_SPECTRUM_MGMT;
675675
676+ if (ifmgd->flags & IEEE80211_STA_ENABLE_RRM)
677+ capab |= WLAN_CAPABILITY_RADIO_MEASURE;
678+
676679 mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
677680 memset(mgmt, 0, 24);
678681 memcpy(mgmt->da, assoc_data->bss->bssid, ETH_ALEN);
@@ -738,16 +741,17 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) · 59 unmodified lines
738741 }
739742 }
740743
741− if (capab & WLAN_CAPABILITY_SPECTRUM_MGMT) {
742− /* 1. power capabilities */
744+ if (capab & WLAN_CAPABILITY_SPECTRUM_MGMT ||
745+ capab & WLAN_CAPABILITY_RADIO_MEASURE) {
743746 pos = skb_put(skb, 4);
744747 *pos++ = WLAN_EID_PWR_CAPABILITY;
745748 *pos++ = 2;
746749 *pos++ = 0; /* min tx power */
747750 /* max tx power */
748751 *pos++ = ieee80211_chandef_max_power(&chanctx_conf->def);
752+ }
749753
750− /* 2. supported channels */
754+ if (capab & WLAN_CAPABILITY_SPECTRUM_MGMT) {
751755 /* TODO: get this in reg domain format */
752756 pos = skb_put(skb, 2 * sband->n_channels + 2);
753757 *pos++ = WLAN_EID_SUPPORTED_CHANNELS;
@@ -4410,6 +4414,11 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, · 3656 unmodified lines
44104414 ifmgd->flags &= ~IEEE80211_STA_MFP_ENABLED;
44114415 }
44124416
4417+ if (req->flags & ASSOC_REQ_USE_RRM)
4418+ ifmgd->flags |= IEEE80211_STA_ENABLE_RRM;
4419+ else
4420+ ifmgd->flags &= ~IEEE80211_STA_ENABLE_RRM;
4421+
44134422 if (req->crypto.control_port)
44144423 ifmgd->flags |= IEEE80211_STA_CONTROL_PORT;
44154424 else

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t