aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/spectmgmt.c
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2009-01-09 07:44:15 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:00:15 -0500
commita8302de934b5d1897ff146cd0c7ab87d1417c092 (patch)
tree5a73ad4dd787cc02e14aa8975d267adb5812d8fe /net/mac80211/spectmgmt.c
parent01f8162a854df7f9c259c839ad3c1168ac13b7b8 (diff)
mac80211: Handle power constraint level advertised in 11d+h beacon
This patch uses power constraint level while determining the maximum transmit power, there by it makes sure that any power mitigation requirement for the channel in the current regulatory domain is met. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/spectmgmt.c')
-rw-r--r--net/mac80211/spectmgmt.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c
index 8396b5a77e8d..8d4ec2968f8f 100644
--- a/net/mac80211/spectmgmt.c
+++ b/net/mac80211/spectmgmt.c
@@ -161,3 +161,24 @@ void ieee80211_process_chanswitch(struct ieee80211_sub_if_data *sdata,
161 jiffies + msecs_to_jiffies(sw_elem->count * bss->beacon_int)); 161 jiffies + msecs_to_jiffies(sw_elem->count * bss->beacon_int));
162 } 162 }
163} 163}
164
165void ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata,
166 u16 capab_info, u8 *pwr_constr_elem,
167 u8 pwr_constr_elem_len)
168{
169 struct ieee80211_conf *conf = &sdata->local->hw.conf;
170
171 if (!(capab_info & WLAN_CAPABILITY_SPECTRUM_MGMT))
172 return;
173
174 /* Power constraint IE length should be 1 octet */
175 if (pwr_constr_elem_len != 1)
176 return;
177
178 if ((*pwr_constr_elem <= conf->channel->max_power) &&
179 (*pwr_constr_elem != sdata->local->power_constr_level)) {
180 sdata->local->power_constr_level = *pwr_constr_elem;
181 ieee80211_hw_config(sdata->local, 0);
182 }
183}
184