Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328154
b: refs/heads/master
c: 761a48d
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg committed Sep 6, 2012
1 parent 166a4db commit 6b9ed05
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f8fffc7e51462f51ffca6d0df505ef16afee2fb6
refs/heads/master: 761a48d2603c0ff48024bc70c129b00ec37639ed
1 change: 0 additions & 1 deletion trunk/net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,6 @@ struct ieee802_11_elems {
u8 prep_len;
u8 perr_len;
u8 country_elem_len;
u8 pwr_constr_elem_len;
u8 quiet_elem_len;
u8 num_of_quiet_elem; /* can be more the one */
u8 timeout_int_len;
Expand Down
10 changes: 2 additions & 8 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,18 +821,13 @@ void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
}

static void ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata,
u16 capab_info, u8 *pwr_constr_elem,
u8 pwr_constr_elem_len)
u16 capab_info, u8 *pwr_constr_elem)
{
struct ieee80211_conf *conf = &sdata->local->hw.conf;

if (!(capab_info & WLAN_CAPABILITY_SPECTRUM_MGMT))
return;

/* Power constraint IE length should be 1 octet */
if (pwr_constr_elem_len != 1)
return;

if ((*pwr_constr_elem <= conf->channel->max_reg_power) &&
(*pwr_constr_elem != sdata->local->power_constr_level)) {
sdata->local->power_constr_level = *pwr_constr_elem;
Expand Down Expand Up @@ -2552,8 +2547,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
if (elems.pwr_constr_elem)
ieee80211_handle_pwr_constr(sdata,
le16_to_cpu(mgmt->u.probe_resp.capab_info),
elems.pwr_constr_elem,
elems.pwr_constr_elem_len);
elems.pwr_constr_elem);
}

ieee80211_bss_info_change_notify(sdata, changed);
Expand Down
5 changes: 4 additions & 1 deletion trunk/net/mac80211/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,11 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
elems->country_elem_len = elen;
break;
case WLAN_EID_PWR_CONSTRAINT:
if (elen != 1) {
elem_parse_failed = true;
break;
}
elems->pwr_constr_elem = pos;
elems->pwr_constr_elem_len = elen;
break;
case WLAN_EID_TIMEOUT_INTERVAL:
elems->timeout_int = pos;
Expand Down

0 comments on commit 6b9ed05

Please sign in to comment.