aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1211rw/zd_ieee80211.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_ieee80211.h')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_ieee80211.h43
1 files changed, 27 insertions, 16 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_ieee80211.h b/drivers/net/wireless/zd1211rw/zd_ieee80211.h
index c4f36d39642b..fbf6491dce7e 100644
--- a/drivers/net/wireless/zd1211rw/zd_ieee80211.h
+++ b/drivers/net/wireless/zd1211rw/zd_ieee80211.h
@@ -43,21 +43,25 @@ struct ofdm_plcp_header {
43 __le16 service; 43 __le16 service;
44} __attribute__((packed)); 44} __attribute__((packed));
45 45
46static inline u8 zd_ofdm_plcp_header_rate( 46static inline u8 zd_ofdm_plcp_header_rate(const struct ofdm_plcp_header *header)
47 const struct ofdm_plcp_header *header)
48{ 47{
49 return header->prefix[0] & 0xf; 48 return header->prefix[0] & 0xf;
50} 49}
51 50
52/* These are referred to as zd_rates */ 51/* The following defines give the encoding of the 4-bit rate field in the
53#define ZD_OFDM_RATE_6M 0xb 52 * OFDM (802.11a/802.11g) PLCP header. Notify that these values are used to
54#define ZD_OFDM_RATE_9M 0xf 53 * define the zd-rate values for OFDM.
55#define ZD_OFDM_RATE_12M 0xa 54 *
56#define ZD_OFDM_RATE_18M 0xe 55 * See the struct zd_ctrlset definition in zd_mac.h.
57#define ZD_OFDM_RATE_24M 0x9 56 */
58#define ZD_OFDM_RATE_36M 0xd 57#define ZD_OFDM_PLCP_RATE_6M 0xb
59#define ZD_OFDM_RATE_48M 0x8 58#define ZD_OFDM_PLCP_RATE_9M 0xf
60#define ZD_OFDM_RATE_54M 0xc 59#define ZD_OFDM_PLCP_RATE_12M 0xa
60#define ZD_OFDM_PLCP_RATE_18M 0xe
61#define ZD_OFDM_PLCP_RATE_24M 0x9
62#define ZD_OFDM_PLCP_RATE_36M 0xd
63#define ZD_OFDM_PLCP_RATE_48M 0x8
64#define ZD_OFDM_PLCP_RATE_54M 0xc
61 65
62struct cck_plcp_header { 66struct cck_plcp_header {
63 u8 signal; 67 u8 signal;
@@ -66,15 +70,22 @@ struct cck_plcp_header {
66 __le16 crc16; 70 __le16 crc16;
67} __attribute__((packed)); 71} __attribute__((packed));
68 72
69static inline u8 zd_cck_plcp_header_rate(const struct cck_plcp_header *header) 73static inline u8 zd_cck_plcp_header_signal(const struct cck_plcp_header *header)
70{ 74{
71 return header->signal; 75 return header->signal;
72} 76}
73 77
74#define ZD_CCK_SIGNAL_1M 0x0a 78/* These defines give the encodings of the signal field in the 802.11b PLCP
75#define ZD_CCK_SIGNAL_2M 0x14 79 * header. The signal field gives the bit rate of the following packet. Even
76#define ZD_CCK_SIGNAL_5M5 0x37 80 * if technically wrong we use CCK here also for the 1 MBit/s and 2 MBit/s
77#define ZD_CCK_SIGNAL_11M 0x6e 81 * rate to stay consistent with Zydas and our use of the term.
82 *
83 * Notify that these values are *not* used in the zd-rates.
84 */
85#define ZD_CCK_PLCP_SIGNAL_1M 0x0a
86#define ZD_CCK_PLCP_SIGNAL_2M 0x14
87#define ZD_CCK_PLCP_SIGNAL_5M5 0x37
88#define ZD_CCK_PLCP_SIGNAL_11M 0x6e
78 89
79enum ieee80211_std { 90enum ieee80211_std {
80 IEEE80211B = 0x01, 91 IEEE80211B = 0x01,