diff options
author | Eliad Peller <eliad@wizery.com> | 2011-08-14 06:17:11 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-08-22 05:35:25 -0400 |
commit | 79b122dc51797b650201f21360481a0450e9b7e4 (patch) | |
tree | c052cd2b1bc6ee918024d9b3c409e2098c3b4c91 /drivers/net/wireless/wl12xx | |
parent | a4e02f330a69a305c4f7bc98d56e72aa0d4b6032 (diff) |
wl12xx: update rx/tx
Update the rx/tx descriptors according to the new fw api
(fw >= 6/7.3.0.0.75)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r-- | drivers/net/wireless/wl12xx/rx.h | 7 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/tx.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/tx.h | 14 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl12xx.h | 2 |
4 files changed, 18 insertions, 20 deletions
diff --git a/drivers/net/wireless/wl12xx/rx.h b/drivers/net/wireless/wl12xx/rx.h index 00c1c1d27aaa..86ba6b1d0cdc 100644 --- a/drivers/net/wireless/wl12xx/rx.h +++ b/drivers/net/wireless/wl12xx/rx.h | |||
@@ -86,7 +86,7 @@ | |||
86 | * Bits 3-5 - process_id tag (AP mode FW) | 86 | * Bits 3-5 - process_id tag (AP mode FW) |
87 | * Bits 6-7 - reserved | 87 | * Bits 6-7 - reserved |
88 | */ | 88 | */ |
89 | #define WL1271_RX_DESC_STATUS_MASK 0x07 | 89 | #define WL1271_RX_DESC_STATUS_MASK 0x03 |
90 | 90 | ||
91 | #define WL1271_RX_DESC_SUCCESS 0x00 | 91 | #define WL1271_RX_DESC_SUCCESS 0x00 |
92 | #define WL1271_RX_DESC_DECRYPT_FAIL 0x01 | 92 | #define WL1271_RX_DESC_DECRYPT_FAIL 0x01 |
@@ -121,10 +121,7 @@ struct wl1271_rx_descriptor { | |||
121 | u8 snr; | 121 | u8 snr; |
122 | __le32 timestamp; | 122 | __le32 timestamp; |
123 | u8 packet_class; | 123 | u8 packet_class; |
124 | union { | 124 | u8 hlid; |
125 | u8 process_id; /* STA FW */ | ||
126 | u8 hlid; /* AP FW */ | ||
127 | } __packed; | ||
128 | u8 pad_len; | 125 | u8 pad_len; |
129 | u8 reserved; | 126 | u8 reserved; |
130 | } __packed; | 127 | } __packed; |
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c index f4973366a88b..23ce7aaeb4c4 100644 --- a/drivers/net/wireless/wl12xx/tx.c +++ b/drivers/net/wireless/wl12xx/tx.c | |||
@@ -276,9 +276,9 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct sk_buff *skb, | |||
276 | wl->session_counter << TX_HW_ATTR_OFST_SESSION_COUNTER; | 276 | wl->session_counter << TX_HW_ATTR_OFST_SESSION_COUNTER; |
277 | } | 277 | } |
278 | 278 | ||
279 | if (wl->bss_type != BSS_TYPE_AP_BSS) { | 279 | desc->hlid = hlid; |
280 | desc->aid = hlid; | ||
281 | 280 | ||
281 | if (wl->bss_type != BSS_TYPE_AP_BSS) { | ||
282 | /* if the packets are destined for AP (have a STA entry) | 282 | /* if the packets are destined for AP (have a STA entry) |
283 | send them with AP rate policies, otherwise use default | 283 | send them with AP rate policies, otherwise use default |
284 | basic rates */ | 284 | basic rates */ |
@@ -287,7 +287,6 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct sk_buff *skb, | |||
287 | else | 287 | else |
288 | rate_idx = ACX_TX_BASIC_RATE; | 288 | rate_idx = ACX_TX_BASIC_RATE; |
289 | } else { | 289 | } else { |
290 | desc->hlid = hlid; | ||
291 | switch (hlid) { | 290 | switch (hlid) { |
292 | case WL1271_AP_GLOBAL_HLID: | 291 | case WL1271_AP_GLOBAL_HLID: |
293 | rate_idx = ACX_TX_AP_MODE_MGMT_RATE; | 292 | rate_idx = ACX_TX_AP_MODE_MGMT_RATE; |
@@ -375,7 +374,15 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct sk_buff *skb, | |||
375 | if (wl->bss_type == BSS_TYPE_AP_BSS) | 374 | if (wl->bss_type == BSS_TYPE_AP_BSS) |
376 | hlid = wl1271_tx_get_hlid(skb); | 375 | hlid = wl1271_tx_get_hlid(skb); |
377 | else | 376 | else |
378 | hlid = TX_HW_DEFAULT_AID; | 377 | if (test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags)) |
378 | hlid = wl->sta_hlid; | ||
379 | else | ||
380 | hlid = wl->dev_hlid; | ||
381 | |||
382 | if (hlid == WL12XX_INVALID_LINK_ID) { | ||
383 | wl1271_error("invalid hlid. dropping skb 0x%p", skb); | ||
384 | return -EINVAL; | ||
385 | } | ||
379 | 386 | ||
380 | ret = wl1271_tx_allocate(wl, skb, extra, buf_offset, hlid); | 387 | ret = wl1271_tx_allocate(wl, skb, extra, buf_offset, hlid); |
381 | if (ret < 0) | 388 | if (ret < 0) |
diff --git a/drivers/net/wireless/wl12xx/tx.h b/drivers/net/wireless/wl12xx/tx.h index 5d719b5a3d1d..b712d7b058a8 100644 --- a/drivers/net/wireless/wl12xx/tx.h +++ b/drivers/net/wireless/wl12xx/tx.h | |||
@@ -29,9 +29,6 @@ | |||
29 | 29 | ||
30 | #define TX_HW_MGMT_PKT_LIFETIME_TU 2000 | 30 | #define TX_HW_MGMT_PKT_LIFETIME_TU 2000 |
31 | #define TX_HW_AP_MODE_PKT_LIFETIME_TU 8000 | 31 | #define TX_HW_AP_MODE_PKT_LIFETIME_TU 8000 |
32 | /* The chipset reference driver states, that the "aid" value 1 | ||
33 | * is for infra-BSS, but is still always used */ | ||
34 | #define TX_HW_DEFAULT_AID 1 | ||
35 | 32 | ||
36 | #define TX_HW_ATTR_SAVE_RETRIES BIT(0) | 33 | #define TX_HW_ATTR_SAVE_RETRIES BIT(0) |
37 | #define TX_HW_ATTR_HEADER_PAD BIT(1) | 34 | #define TX_HW_ATTR_HEADER_PAD BIT(1) |
@@ -116,12 +113,8 @@ struct wl1271_tx_hw_descr { | |||
116 | u8 id; | 113 | u8 id; |
117 | /* The packet TID value (as User-Priority) */ | 114 | /* The packet TID value (as User-Priority) */ |
118 | u8 tid; | 115 | u8 tid; |
119 | union { | 116 | /* host link ID (HLID) */ |
120 | /* STA - Identifier of the remote STA in IBSS, 1 in infra-BSS */ | 117 | u8 hlid; |
121 | u8 aid; | ||
122 | /* AP - host link ID (HLID) */ | ||
123 | u8 hlid; | ||
124 | } __packed; | ||
125 | u8 reserved; | 118 | u8 reserved; |
126 | } __packed; | 119 | } __packed; |
127 | 120 | ||
@@ -133,7 +126,8 @@ enum wl1271_tx_hw_res_status { | |||
133 | TX_TIMEOUT = 4, | 126 | TX_TIMEOUT = 4, |
134 | TX_KEY_NOT_FOUND = 5, | 127 | TX_KEY_NOT_FOUND = 5, |
135 | TX_PEER_NOT_FOUND = 6, | 128 | TX_PEER_NOT_FOUND = 6, |
136 | TX_SESSION_MISMATCH = 7 | 129 | TX_SESSION_MISMATCH = 7, |
130 | TX_LINK_NOT_VALID = 8, | ||
137 | }; | 131 | }; |
138 | 132 | ||
139 | struct wl1271_tx_hw_res_descr { | 133 | struct wl1271_tx_hw_res_descr { |
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h index ab46664969ec..93e689d1f46a 100644 --- a/drivers/net/wireless/wl12xx/wl12xx.h +++ b/drivers/net/wireless/wl12xx/wl12xx.h | |||
@@ -159,7 +159,7 @@ extern u32 wl12xx_debug_level; | |||
159 | #define WL1271_AP_BSS_INDEX 0 | 159 | #define WL1271_AP_BSS_INDEX 0 |
160 | #define WL1271_AP_DEF_BEACON_EXP 20 | 160 | #define WL1271_AP_DEF_BEACON_EXP 20 |
161 | 161 | ||
162 | #define ACX_TX_DESCRIPTORS 32 | 162 | #define ACX_TX_DESCRIPTORS 16 |
163 | 163 | ||
164 | #define WL1271_AGGR_BUFFER_SIZE (4 * PAGE_SIZE) | 164 | #define WL1271_AGGR_BUFFER_SIZE (4 * PAGE_SIZE) |
165 | 165 | ||