aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/ieee80211.h54
-rw-r--r--net/mac80211/ieee80211_i.h9
-rw-r--r--net/mac80211/mlme.c19
3 files changed, 79 insertions, 3 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 2998e3b5f166..8546f09e462c 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -469,6 +469,40 @@ struct ieee80211s_hdr {
469 u8 eaddr3[6]; 469 u8 eaddr3[6];
470} __attribute__ ((packed)); 470} __attribute__ ((packed));
471 471
472/**
473 * struct ieee80211_quiet_ie
474 *
475 * This structure refers to "Quiet information element"
476 */
477struct ieee80211_quiet_ie {
478 u8 count;
479 u8 period;
480 __le16 duration;
481 __le16 offset;
482} __attribute__ ((packed));
483
484/**
485 * struct ieee80211_msrment_ie
486 *
487 * This structure refers to "Measurement Request/Report information element"
488 */
489struct ieee80211_msrment_ie {
490 u8 token;
491 u8 mode;
492 u8 type;
493 u8 request[0];
494} __attribute__ ((packed));
495
496/**
497 * struct ieee80211_channel_sw_ie
498 *
499 * This structure refers to "Channel Switch Announcement information element"
500 */
501struct ieee80211_channel_sw_ie {
502 u8 mode;
503 u8 new_ch_num;
504 u8 count;
505} __attribute__ ((packed));
472 506
473struct ieee80211_mgmt { 507struct ieee80211_mgmt {
474 __le16 frame_control; 508 __le16 frame_control;
@@ -544,13 +578,18 @@ struct ieee80211_mgmt {
544 u8 action_code; 578 u8 action_code;
545 u8 element_id; 579 u8 element_id;
546 u8 length; 580 u8 length;
547 u8 switch_mode; 581 struct ieee80211_channel_sw_ie sw_elem;
548 u8 new_chan;
549 u8 switch_count;
550 } __attribute__((packed)) chan_switch; 582 } __attribute__((packed)) chan_switch;
551 struct{ 583 struct{
552 u8 action_code; 584 u8 action_code;
553 u8 dialog_token; 585 u8 dialog_token;
586 u8 element_id;
587 u8 length;
588 struct ieee80211_msrment_ie msr_elem;
589 } __attribute__((packed)) measurement;
590 struct{
591 u8 action_code;
592 u8 dialog_token;
554 __le16 capab; 593 __le16 capab;
555 __le16 timeout; 594 __le16 timeout;
556 __le16 start_seq_num; 595 __le16 start_seq_num;
@@ -875,6 +914,15 @@ enum ieee80211_category {
875 WLAN_CATEGORY_WMM = 17, 914 WLAN_CATEGORY_WMM = 17,
876}; 915};
877 916
917/* SPECTRUM_MGMT action code */
918enum ieee80211_spectrum_mgmt_actioncode {
919 WLAN_ACTION_SPCT_MSR_REQ = 0,
920 WLAN_ACTION_SPCT_MSR_RPRT = 1,
921 WLAN_ACTION_SPCT_TPC_REQ = 2,
922 WLAN_ACTION_SPCT_TPC_RPRT = 3,
923 WLAN_ACTION_SPCT_CHL_SWITCH = 4,
924};
925
878/* BACK action code */ 926/* BACK action code */
879enum ieee80211_back_actioncode { 927enum ieee80211_back_actioncode {
880 WLAN_ACTION_ADDBA_REQ = 0, 928 WLAN_ACTION_ADDBA_REQ = 0,
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 80a9e7c07b47..af352c05c983 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -791,6 +791,10 @@ struct ieee802_11_elems {
791 u8 *preq; 791 u8 *preq;
792 u8 *prep; 792 u8 *prep;
793 u8 *perr; 793 u8 *perr;
794 u8 *ch_switch_elem;
795 u8 *country_elem;
796 u8 *pwr_constr_elem;
797 u8 *quiet_elem; /* first quite element */
794 798
795 /* length of them, respectively */ 799 /* length of them, respectively */
796 u8 ssid_len; 800 u8 ssid_len;
@@ -815,6 +819,11 @@ struct ieee802_11_elems {
815 u8 preq_len; 819 u8 preq_len;
816 u8 prep_len; 820 u8 prep_len;
817 u8 perr_len; 821 u8 perr_len;
822 u8 ch_switch_elem_len;
823 u8 country_elem_len;
824 u8 pwr_constr_elem_len;
825 u8 quiet_elem_len;
826 u8 num_of_quiet_elem; /* can be more the one */
818}; 827};
819 828
820static inline struct ieee80211_local *hw_to_local( 829static inline struct ieee80211_local *hw_to_local(
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index e06d6450f215..32453561fe32 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -204,6 +204,25 @@ void ieee802_11_parse_elems(u8 *start, size_t len,
204 elems->perr = pos; 204 elems->perr = pos;
205 elems->perr_len = elen; 205 elems->perr_len = elen;
206 break; 206 break;
207 case WLAN_EID_CHANNEL_SWITCH:
208 elems->ch_switch_elem = pos;
209 elems->ch_switch_elem_len = elen;
210 break;
211 case WLAN_EID_QUIET:
212 if (!elems->quiet_elem) {
213 elems->quiet_elem = pos;
214 elems->quiet_elem_len = elen;
215 }
216 elems->num_of_quiet_elem++;
217 break;
218 case WLAN_EID_COUNTRY:
219 elems->country_elem = pos;
220 elems->country_elem_len = elen;
221 break;
222 case WLAN_EID_PWR_CONSTRAINT:
223 elems->pwr_constr_elem = pos;
224 elems->pwr_constr_elem_len = elen;
225 break;
207 default: 226 default:
208 break; 227 break;
209 } 228 }