aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl1251/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl1251/rx.c')
-rw-r--r--drivers/net/wireless/wl1251/rx.c46
1 files changed, 45 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl1251/rx.c b/drivers/net/wireless/wl1251/rx.c
index 86eef456d7b2..b659e15c78df 100644
--- a/drivers/net/wireless/wl1251/rx.c
+++ b/drivers/net/wireless/wl1251/rx.c
@@ -96,8 +96,52 @@ static void wl1251_rx_status(struct wl1251 *wl,
96 if (unlikely(!(desc->flags & RX_DESC_VALID_FCS))) 96 if (unlikely(!(desc->flags & RX_DESC_VALID_FCS)))
97 status->flag |= RX_FLAG_FAILED_FCS_CRC; 97 status->flag |= RX_FLAG_FAILED_FCS_CRC;
98 98
99 switch (desc->rate) {
100 /* skip 1 and 12 Mbps because they have same value 0x0a */
101 case RATE_2MBPS:
102 status->rate_idx = 1;
103 break;
104 case RATE_5_5MBPS:
105 status->rate_idx = 2;
106 break;
107 case RATE_11MBPS:
108 status->rate_idx = 3;
109 break;
110 case RATE_6MBPS:
111 status->rate_idx = 4;
112 break;
113 case RATE_9MBPS:
114 status->rate_idx = 5;
115 break;
116 case RATE_18MBPS:
117 status->rate_idx = 7;
118 break;
119 case RATE_24MBPS:
120 status->rate_idx = 8;
121 break;
122 case RATE_36MBPS:
123 status->rate_idx = 9;
124 break;
125 case RATE_48MBPS:
126 status->rate_idx = 10;
127 break;
128 case RATE_54MBPS:
129 status->rate_idx = 11;
130 break;
131 }
132
133 /* for 1 and 12 Mbps we have to check the modulation */
134 if (desc->rate == RATE_1MBPS) {
135 if (!(desc->mod_pre & OFDM_RATE_BIT))
136 /* CCK -> RATE_1MBPS */
137 status->rate_idx = 0;
138 else
139 /* OFDM -> RATE_12MBPS */
140 status->rate_idx = 6;
141 }
99 142
100 /* FIXME: set status->rate_idx */ 143 if (desc->mod_pre & SHORT_PREAMBLE_BIT)
144 status->flag |= RX_FLAG_SHORTPRE;
101} 145}
102 146
103static void wl1251_rx_body(struct wl1251 *wl, 147static void wl1251_rx_body(struct wl1251 *wl,