diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/ieee80211.h | 50 | ||||
-rw-r--r-- | include/net/ipv6.h | 1 | ||||
-rw-r--r-- | include/net/sctp/constants.h | 18 | ||||
-rw-r--r-- | include/net/sctp/structs.h | 4 |
4 files changed, 19 insertions, 54 deletions
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index 7fe57f957a51..db09580ad14b 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
@@ -94,6 +94,8 @@ struct eapol { | |||
94 | u16 length; | 94 | u16 length; |
95 | } __attribute__ ((packed)); | 95 | } __attribute__ ((packed)); |
96 | 96 | ||
97 | #define IEEE80211_1ADDR_LEN 10 | ||
98 | #define IEEE80211_2ADDR_LEN 16 | ||
97 | #define IEEE80211_3ADDR_LEN 24 | 99 | #define IEEE80211_3ADDR_LEN 24 |
98 | #define IEEE80211_4ADDR_LEN 30 | 100 | #define IEEE80211_4ADDR_LEN 30 |
99 | #define IEEE80211_FCS_LEN 4 | 101 | #define IEEE80211_FCS_LEN 4 |
@@ -300,23 +302,6 @@ struct ieee80211_snap_hdr { | |||
300 | #define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9 | 302 | #define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9 |
301 | 303 | ||
302 | 304 | ||
303 | /* Information Element IDs */ | ||
304 | #define WLAN_EID_SSID 0 | ||
305 | #define WLAN_EID_SUPP_RATES 1 | ||
306 | #define WLAN_EID_FH_PARAMS 2 | ||
307 | #define WLAN_EID_DS_PARAMS 3 | ||
308 | #define WLAN_EID_CF_PARAMS 4 | ||
309 | #define WLAN_EID_TIM 5 | ||
310 | #define WLAN_EID_IBSS_PARAMS 6 | ||
311 | #define WLAN_EID_CHALLENGE 16 | ||
312 | #define WLAN_EID_RSN 48 | ||
313 | #define WLAN_EID_GENERIC 221 | ||
314 | |||
315 | #define IEEE80211_MGMT_HDR_LEN 24 | ||
316 | #define IEEE80211_DATA_HDR3_LEN 24 | ||
317 | #define IEEE80211_DATA_HDR4_LEN 30 | ||
318 | |||
319 | |||
320 | #define IEEE80211_STATMASK_SIGNAL (1<<0) | 305 | #define IEEE80211_STATMASK_SIGNAL (1<<0) |
321 | #define IEEE80211_STATMASK_RSSI (1<<1) | 306 | #define IEEE80211_STATMASK_RSSI (1<<1) |
322 | #define IEEE80211_STATMASK_NOISE (1<<2) | 307 | #define IEEE80211_STATMASK_NOISE (1<<2) |
@@ -441,6 +426,10 @@ struct ieee80211_stats { | |||
441 | 426 | ||
442 | struct ieee80211_device; | 427 | struct ieee80211_device; |
443 | 428 | ||
429 | #if 0 /* for later */ | ||
430 | #include "ieee80211_crypt.h" | ||
431 | #endif | ||
432 | |||
444 | #define SEC_KEY_1 (1<<0) | 433 | #define SEC_KEY_1 (1<<0) |
445 | #define SEC_KEY_2 (1<<1) | 434 | #define SEC_KEY_2 (1<<1) |
446 | #define SEC_KEY_3 (1<<2) | 435 | #define SEC_KEY_3 (1<<2) |
@@ -488,15 +477,6 @@ Total: 28-2340 bytes | |||
488 | 477 | ||
489 | */ | 478 | */ |
490 | 479 | ||
491 | struct ieee80211_header_data { | ||
492 | u16 frame_ctl; | ||
493 | u16 duration_id; | ||
494 | u8 addr1[6]; | ||
495 | u8 addr2[6]; | ||
496 | u8 addr3[6]; | ||
497 | u16 seq_ctrl; | ||
498 | }; | ||
499 | |||
500 | #define BEACON_PROBE_SSID_ID_POSITION 12 | 480 | #define BEACON_PROBE_SSID_ID_POSITION 12 |
501 | 481 | ||
502 | /* Management Frame Information Element Types */ | 482 | /* Management Frame Information Element Types */ |
@@ -541,7 +521,7 @@ struct ieee80211_info_element { | |||
541 | */ | 521 | */ |
542 | 522 | ||
543 | struct ieee80211_authentication { | 523 | struct ieee80211_authentication { |
544 | struct ieee80211_header_data header; | 524 | struct ieee80211_hdr_3addr header; |
545 | u16 algorithm; | 525 | u16 algorithm; |
546 | u16 transaction; | 526 | u16 transaction; |
547 | u16 status; | 527 | u16 status; |
@@ -550,7 +530,7 @@ struct ieee80211_authentication { | |||
550 | 530 | ||
551 | 531 | ||
552 | struct ieee80211_probe_response { | 532 | struct ieee80211_probe_response { |
553 | struct ieee80211_header_data header; | 533 | struct ieee80211_hdr_3addr header; |
554 | u32 time_stamp[2]; | 534 | u32 time_stamp[2]; |
555 | u16 beacon_interval; | 535 | u16 beacon_interval; |
556 | u16 capability; | 536 | u16 capability; |
@@ -648,12 +628,6 @@ enum ieee80211_state { | |||
648 | #define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5] | 628 | #define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5] |
649 | 629 | ||
650 | 630 | ||
651 | extern inline int is_broadcast_ether_addr(const u8 *addr) | ||
652 | { | ||
653 | return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \ | ||
654 | (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff)); | ||
655 | } | ||
656 | |||
657 | #define CFG_IEEE80211_RESERVE_FCS (1<<0) | 631 | #define CFG_IEEE80211_RESERVE_FCS (1<<0) |
658 | #define CFG_IEEE80211_COMPUTE_FCS (1<<1) | 632 | #define CFG_IEEE80211_COMPUTE_FCS (1<<1) |
659 | 633 | ||
@@ -787,21 +761,21 @@ extern inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mod | |||
787 | 761 | ||
788 | extern inline int ieee80211_get_hdrlen(u16 fc) | 762 | extern inline int ieee80211_get_hdrlen(u16 fc) |
789 | { | 763 | { |
790 | int hdrlen = 24; | 764 | int hdrlen = IEEE80211_3ADDR_LEN; |
791 | 765 | ||
792 | switch (WLAN_FC_GET_TYPE(fc)) { | 766 | switch (WLAN_FC_GET_TYPE(fc)) { |
793 | case IEEE80211_FTYPE_DATA: | 767 | case IEEE80211_FTYPE_DATA: |
794 | if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS)) | 768 | if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS)) |
795 | hdrlen = 30; /* Addr4 */ | 769 | hdrlen = IEEE80211_4ADDR_LEN; |
796 | break; | 770 | break; |
797 | case IEEE80211_FTYPE_CTL: | 771 | case IEEE80211_FTYPE_CTL: |
798 | switch (WLAN_FC_GET_STYPE(fc)) { | 772 | switch (WLAN_FC_GET_STYPE(fc)) { |
799 | case IEEE80211_STYPE_CTS: | 773 | case IEEE80211_STYPE_CTS: |
800 | case IEEE80211_STYPE_ACK: | 774 | case IEEE80211_STYPE_ACK: |
801 | hdrlen = 10; | 775 | hdrlen = IEEE80211_1ADDR_LEN; |
802 | break; | 776 | break; |
803 | default: | 777 | default: |
804 | hdrlen = 16; | 778 | hdrlen = IEEE80211_2ADDR_LEN; |
805 | break; | 779 | break; |
806 | } | 780 | } |
807 | break; | 781 | break; |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 771b47e30f86..69324465e8b3 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -183,7 +183,6 @@ struct ipv6_txoptions | |||
183 | struct ipv6_opt_hdr *hopopt; | 183 | struct ipv6_opt_hdr *hopopt; |
184 | struct ipv6_opt_hdr *dst0opt; | 184 | struct ipv6_opt_hdr *dst0opt; |
185 | struct ipv6_rt_hdr *srcrt; /* Routing Header */ | 185 | struct ipv6_rt_hdr *srcrt; /* Routing Header */ |
186 | struct ipv6_opt_hdr *auth; | ||
187 | struct ipv6_opt_hdr *dst1opt; | 186 | struct ipv6_opt_hdr *dst1opt; |
188 | 187 | ||
189 | /* Option buffer, as read by IPV6_PKTOPTIONS, starts here. */ | 188 | /* Option buffer, as read by IPV6_PKTOPTIONS, starts here. */ |
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h index 4868c7f7749d..5999e5684bbf 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h | |||
@@ -263,23 +263,11 @@ enum { SCTP_MIN_PMTU = 576 }; | |||
263 | enum { SCTP_MAX_DUP_TSNS = 16 }; | 263 | enum { SCTP_MAX_DUP_TSNS = 16 }; |
264 | enum { SCTP_MAX_GABS = 16 }; | 264 | enum { SCTP_MAX_GABS = 16 }; |
265 | 265 | ||
266 | /* Here we define the default timers. */ | 266 | /* Heartbeat interval - 30 secs */ |
267 | #define SCTP_DEFAULT_TIMEOUT_HEARTBEAT (30 * HZ) | ||
267 | 268 | ||
268 | /* cookie timer def = ? seconds */ | 269 | /* Delayed sack timer - 200ms */ |
269 | #define SCTP_DEFAULT_TIMEOUT_T1_COOKIE (3 * HZ) | ||
270 | |||
271 | /* init timer def = 3 seconds */ | ||
272 | #define SCTP_DEFAULT_TIMEOUT_T1_INIT (3 * HZ) | ||
273 | |||
274 | /* shutdown timer def = 300 ms */ | ||
275 | #define SCTP_DEFAULT_TIMEOUT_T2_SHUTDOWN ((300 * HZ) / 1000) | ||
276 | |||
277 | /* 0 seconds + RTO */ | ||
278 | #define SCTP_DEFAULT_TIMEOUT_HEARTBEAT (10 * HZ) | ||
279 | |||
280 | /* recv timer def = 200ms (in usec) */ | ||
281 | #define SCTP_DEFAULT_TIMEOUT_SACK ((200 * HZ) / 1000) | 270 | #define SCTP_DEFAULT_TIMEOUT_SACK ((200 * HZ) / 1000) |
282 | #define SCTP_DEFAULT_TIMEOUT_SACK_MAX ((500 * HZ) / 1000) /* 500 ms */ | ||
283 | 271 | ||
284 | /* RTO.Initial - 3 seconds | 272 | /* RTO.Initial - 3 seconds |
285 | * RTO.Min - 1 second | 273 | * RTO.Min - 1 second |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index dfad4d3c581c..47727c7cc628 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -161,6 +161,9 @@ extern struct sctp_globals { | |||
161 | */ | 161 | */ |
162 | int sndbuf_policy; | 162 | int sndbuf_policy; |
163 | 163 | ||
164 | /* Delayed SACK timeout 200ms default*/ | ||
165 | int sack_timeout; | ||
166 | |||
164 | /* HB.interval - 30 seconds */ | 167 | /* HB.interval - 30 seconds */ |
165 | int hb_interval; | 168 | int hb_interval; |
166 | 169 | ||
@@ -217,6 +220,7 @@ extern struct sctp_globals { | |||
217 | #define sctp_sndbuf_policy (sctp_globals.sndbuf_policy) | 220 | #define sctp_sndbuf_policy (sctp_globals.sndbuf_policy) |
218 | #define sctp_max_retrans_path (sctp_globals.max_retrans_path) | 221 | #define sctp_max_retrans_path (sctp_globals.max_retrans_path) |
219 | #define sctp_max_retrans_init (sctp_globals.max_retrans_init) | 222 | #define sctp_max_retrans_init (sctp_globals.max_retrans_init) |
223 | #define sctp_sack_timeout (sctp_globals.sack_timeout) | ||
220 | #define sctp_hb_interval (sctp_globals.hb_interval) | 224 | #define sctp_hb_interval (sctp_globals.hb_interval) |
221 | #define sctp_max_instreams (sctp_globals.max_instreams) | 225 | #define sctp_max_instreams (sctp_globals.max_instreams) |
222 | #define sctp_max_outstreams (sctp_globals.max_outstreams) | 226 | #define sctp_max_outstreams (sctp_globals.max_outstreams) |