Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103157
b: refs/heads/master
c: f2df385
h: refs/heads/master
i:
  103155: 288a0e3
v: v3
  • Loading branch information
Assaf Krauss authored and John W. Linville committed Jun 26, 2008
1 parent 09da808 commit 398d50b
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 4 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: b99a017c01bb19b58fd0826e36a1bdacf581c545
refs/heads/master: f2df38596a81b6c24f4586b0b4befeaebf3e02db
54 changes: 51 additions & 3 deletions trunk/include/linux/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,40 @@ struct ieee80211s_hdr {
u8 eaddr3[6];
} __attribute__ ((packed));

/**
* struct ieee80211_quiet_ie
*
* This structure refers to "Quiet information element"
*/
struct ieee80211_quiet_ie {
u8 count;
u8 period;
__le16 duration;
__le16 offset;
} __attribute__ ((packed));

/**
* struct ieee80211_msrment_ie
*
* This structure refers to "Measurement Request/Report information element"
*/
struct ieee80211_msrment_ie {
u8 token;
u8 mode;
u8 type;
u8 request[0];
} __attribute__ ((packed));

/**
* struct ieee80211_channel_sw_ie
*
* This structure refers to "Channel Switch Announcement information element"
*/
struct ieee80211_channel_sw_ie {
u8 mode;
u8 new_ch_num;
u8 count;
} __attribute__ ((packed));

struct ieee80211_mgmt {
__le16 frame_control;
Expand Down Expand Up @@ -544,10 +578,15 @@ struct ieee80211_mgmt {
u8 action_code;
u8 element_id;
u8 length;
u8 switch_mode;
u8 new_chan;
u8 switch_count;
struct ieee80211_channel_sw_ie sw_elem;
} __attribute__((packed)) chan_switch;
struct{
u8 action_code;
u8 dialog_token;
u8 element_id;
u8 length;
struct ieee80211_msrment_ie msr_elem;
} __attribute__((packed)) measurement;
struct{
u8 action_code;
u8 dialog_token;
Expand Down Expand Up @@ -875,6 +914,15 @@ enum ieee80211_category {
WLAN_CATEGORY_WMM = 17,
};

/* SPECTRUM_MGMT action code */
enum ieee80211_spectrum_mgmt_actioncode {
WLAN_ACTION_SPCT_MSR_REQ = 0,
WLAN_ACTION_SPCT_MSR_RPRT = 1,
WLAN_ACTION_SPCT_TPC_REQ = 2,
WLAN_ACTION_SPCT_TPC_RPRT = 3,
WLAN_ACTION_SPCT_CHL_SWITCH = 4,
};

/* BACK action code */
enum ieee80211_back_actioncode {
WLAN_ACTION_ADDBA_REQ = 0,
Expand Down
9 changes: 9 additions & 0 deletions trunk/net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,10 @@ struct ieee802_11_elems {
u8 *preq;
u8 *prep;
u8 *perr;
u8 *ch_switch_elem;
u8 *country_elem;
u8 *pwr_constr_elem;
u8 *quiet_elem; /* first quite element */

/* length of them, respectively */
u8 ssid_len;
Expand All @@ -815,6 +819,11 @@ struct ieee802_11_elems {
u8 preq_len;
u8 prep_len;
u8 perr_len;
u8 ch_switch_elem_len;
u8 country_elem_len;
u8 pwr_constr_elem_len;
u8 quiet_elem_len;
u8 num_of_quiet_elem; /* can be more the one */
};

static inline struct ieee80211_local *hw_to_local(
Expand Down
19 changes: 19 additions & 0 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,25 @@ void ieee802_11_parse_elems(u8 *start, size_t len,
elems->perr = pos;
elems->perr_len = elen;
break;
case WLAN_EID_CHANNEL_SWITCH:
elems->ch_switch_elem = pos;
elems->ch_switch_elem_len = elen;
break;
case WLAN_EID_QUIET:
if (!elems->quiet_elem) {
elems->quiet_elem = pos;
elems->quiet_elem_len = elen;
}
elems->num_of_quiet_elem++;
break;
case WLAN_EID_COUNTRY:
elems->country_elem = pos;
elems->country_elem_len = elen;
break;
case WLAN_EID_PWR_CONSTRAINT:
elems->pwr_constr_elem = pos;
elems->pwr_constr_elem_len = elen;
break;
default:
break;
}
Expand Down

0 comments on commit 398d50b

Please sign in to comment.