ath5k: update 5210/5211 frame types
authorBruno Randolf <br1@einfach.org>
Wed, 16 Jun 2010 10:12:22 +0000 (19:12 +0900)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 16 Jun 2010 18:59:06 +0000 (14:59 -0400)
Update 5210 frame types to match the HAL. We have to apply the same bitshift to
the constants as we use later.

Add 5211 specific frame types.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/desc.c
drivers/net/wireless/ath/ath5k/desc.h

index 41a490e4968e08dfb9329cbffa6af1c58a902140..f1f1a22ce4757b05864920080f42531dde74e004 100644 (file)
@@ -110,7 +110,7 @@ ath5k_hw_setup_2word_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
                case AR5K_PKT_TYPE_PIFS:
                        frame_type = AR5K_AR5210_TX_DESC_FRAME_TYPE_PIFS;
                default:
-                       frame_type = type /*<< 2 ?*/;
+                       frame_type = type;
                }
 
                tx_ctl->tx_control_0 |=
index 50f9a12b5acd62ab012c50d715829020aec69e9e..1aca4af2f79f181746b0c3e8d4707a0b311a5b57 100644 (file)
@@ -169,11 +169,13 @@ struct ath5k_hw_2w_tx_ctl {
 #define AR5K_2W_TX_DESC_CTL1_RTS_DURATION_5210 0xfff80000 /* [5210] lower 13 bit of duration */
 
 /* Frame types */
-#define AR5K_AR5210_TX_DESC_FRAME_TYPE_NORMAL   0x00
-#define AR5K_AR5210_TX_DESC_FRAME_TYPE_ATIM     0x04
-#define AR5K_AR5210_TX_DESC_FRAME_TYPE_PSPOLL   0x08
-#define AR5K_AR5210_TX_DESC_FRAME_TYPE_NO_DELAY 0x0c
-#define AR5K_AR5210_TX_DESC_FRAME_TYPE_PIFS     0x10
+#define AR5K_AR5210_TX_DESC_FRAME_TYPE_NORMAL  0
+#define AR5K_AR5210_TX_DESC_FRAME_TYPE_ATIM    1
+#define AR5K_AR5210_TX_DESC_FRAME_TYPE_PSPOLL  2
+#define AR5K_AR5210_TX_DESC_FRAME_TYPE_NO_DELAY        3
+#define AR5K_AR5211_TX_DESC_FRAME_TYPE_BEACON  3
+#define AR5K_AR5210_TX_DESC_FRAME_TYPE_PIFS    4
+#define AR5K_AR5211_TX_DESC_FRAME_TYPE_PRESP   4
 
 /*
  * 5212 hardware 4-word TX control descriptor