diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/rx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/rx.c | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/drivers/net/wireless/wl12xx/rx.c b/drivers/net/wireless/wl12xx/rx.c index 919b59f00301..2a581495d5c9 100644 --- a/drivers/net/wireless/wl12xx/rx.c +++ b/drivers/net/wireless/wl12xx/rx.c | |||
@@ -48,18 +48,14 @@ static void wl1271_rx_status(struct wl1271 *wl, | |||
48 | struct ieee80211_rx_status *status, | 48 | struct ieee80211_rx_status *status, |
49 | u8 beacon) | 49 | u8 beacon) |
50 | { | 50 | { |
51 | enum ieee80211_band desc_band; | ||
52 | |||
53 | memset(status, 0, sizeof(struct ieee80211_rx_status)); | 51 | memset(status, 0, sizeof(struct ieee80211_rx_status)); |
54 | 52 | ||
55 | status->band = wl->band; | ||
56 | |||
57 | if ((desc->flags & WL1271_RX_DESC_BAND_MASK) == WL1271_RX_DESC_BAND_BG) | 53 | if ((desc->flags & WL1271_RX_DESC_BAND_MASK) == WL1271_RX_DESC_BAND_BG) |
58 | desc_band = IEEE80211_BAND_2GHZ; | 54 | status->band = IEEE80211_BAND_2GHZ; |
59 | else | 55 | else |
60 | desc_band = IEEE80211_BAND_5GHZ; | 56 | status->band = IEEE80211_BAND_5GHZ; |
61 | 57 | ||
62 | status->rate_idx = wl1271_rate_to_idx(desc->rate, desc_band); | 58 | status->rate_idx = wl1271_rate_to_idx(desc->rate, status->band); |
63 | 59 | ||
64 | #ifdef CONFIG_WL12XX_HT | 60 | #ifdef CONFIG_WL12XX_HT |
65 | /* 11n support */ | 61 | /* 11n support */ |
@@ -76,7 +72,8 @@ static void wl1271_rx_status(struct wl1271 *wl, | |||
76 | */ | 72 | */ |
77 | wl->noise = desc->rssi - (desc->snr >> 1); | 73 | wl->noise = desc->rssi - (desc->snr >> 1); |
78 | 74 | ||
79 | status->freq = ieee80211_channel_to_frequency(desc->channel, desc_band); | 75 | status->freq = ieee80211_channel_to_frequency(desc->channel, |
76 | status->band); | ||
80 | 77 | ||
81 | if (desc->flags & WL1271_RX_DESC_ENCRYPT_MASK) { | 78 | if (desc->flags & WL1271_RX_DESC_ENCRYPT_MASK) { |
82 | status->flag |= RX_FLAG_IV_STRIPPED | RX_FLAG_MMIC_STRIPPED; | 79 | status->flag |= RX_FLAG_IV_STRIPPED | RX_FLAG_MMIC_STRIPPED; |
@@ -163,18 +160,25 @@ void wl1271_rx(struct wl1271 *wl, struct wl1271_fw_common_status *status) | |||
163 | break; | 160 | break; |
164 | } | 161 | } |
165 | 162 | ||
166 | /* | 163 | if (wl->chip.id != CHIP_ID_1283_PG20) { |
167 | * Choose the block we want to read | 164 | /* |
168 | * For aggregated packets, only the first memory block should | 165 | * Choose the block we want to read |
169 | * be retrieved. The FW takes care of the rest. | 166 | * For aggregated packets, only the first memory block |
170 | */ | 167 | * should be retrieved. The FW takes care of the rest. |
171 | mem_block = wl1271_rx_get_mem_block(status, drv_rx_counter); | 168 | */ |
172 | wl->rx_mem_pool_addr.addr = (mem_block << 8) + | 169 | mem_block = wl1271_rx_get_mem_block(status, |
173 | le32_to_cpu(wl_mem_map->packet_memory_pool_start); | 170 | drv_rx_counter); |
174 | wl->rx_mem_pool_addr.addr_extra = | 171 | |
175 | wl->rx_mem_pool_addr.addr + 4; | 172 | wl->rx_mem_pool_addr.addr = (mem_block << 8) + |
176 | wl1271_write(wl, WL1271_SLV_REG_DATA, &wl->rx_mem_pool_addr, | 173 | le32_to_cpu(wl_mem_map->packet_memory_pool_start); |
177 | sizeof(wl->rx_mem_pool_addr), false); | 174 | |
175 | wl->rx_mem_pool_addr.addr_extra = | ||
176 | wl->rx_mem_pool_addr.addr + 4; | ||
177 | |||
178 | wl1271_write(wl, WL1271_SLV_REG_DATA, | ||
179 | &wl->rx_mem_pool_addr, | ||
180 | sizeof(wl->rx_mem_pool_addr), false); | ||
181 | } | ||
178 | 182 | ||
179 | /* Read all available packets at once */ | 183 | /* Read all available packets at once */ |
180 | wl1271_read(wl, WL1271_SLV_MEM_DATA, wl->aggr_buf, | 184 | wl1271_read(wl, WL1271_SLV_MEM_DATA, wl->aggr_buf, |