summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl12xx/wl12xx.h
diff options
context:
space:
mode:
authorLuciano Coelho <coelho@ti.com>2011-03-10 15:24:57 +0200
committerLuciano Coelho <coelho@ti.com>2011-04-19 16:49:03 +0300
commite7ddf549f3f2da156f5c12921e6699024e80a3f4 (patch)
treedf8f0e4d2ac9e23ec96117ffca35517a3cd94ac6 /drivers/net/wireless/wl12xx/wl12xx.h
parent0830ceedbfde20c9110c59597fdffbf51886565a (diff)
wl12xx: use 1 spare TX block instead of two
All the new firmware versions (>=6.1.3.50.58 for STA and >=6.2.0.0.47 for AP) use 1 spare TX block. We still want to support older firmwares that require 2 spare blocks, so added a quirk to handle the difference. Also implemented a generic way of setting quirks that depend on the firmware revision. Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl12xx.h')
-rw-r--r--drivers/net/wireless/wl12xx/wl12xx.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h
index 890c1a54382d..b04481aadf9c 100644
--- a/drivers/net/wireless/wl12xx/wl12xx.h
+++ b/drivers/net/wireless/wl12xx/wl12xx.h
@@ -207,13 +207,29 @@ struct wl1271_partition_set {
struct wl1271;
-#define WL12XX_NUM_FW_VER 5
+enum {
+ FW_VER_CHIP,
+ FW_VER_IF_TYPE,
+ FW_VER_MAJOR,
+ FW_VER_SUBTYPE,
+ FW_VER_MINOR,
+
+ NUM_FW_VER
+};
+
+#define FW_VER_CHIP_WL127X 6
+#define FW_VER_CHIP_WL128X 7
+
+#define FW_VER_IF_TYPE_STA 1
+#define FW_VER_IF_TYPE_AP 2
+
+#define FW_VER_MINOR_1_SPARE_STA_MIN 58
+#define FW_VER_MINOR_1_SPARE_AP_MIN 47
-/* FIXME: I'm not sure about this structure name */
struct wl1271_chip {
u32 id;
char fw_ver_str[ETHTOOL_BUSINFO_LEN];
- unsigned int fw_ver[WL12XX_NUM_FW_VER];
+ unsigned int fw_ver[NUM_FW_VER];
};
struct wl1271_stats {
@@ -594,4 +610,10 @@ int wl1271_plt_stop(struct wl1271 *wl);
/* Each RX/TX transaction requires an end-of-transaction transfer */
#define WL12XX_QUIRK_END_OF_TRANSACTION BIT(0)
+/*
+ * Older firmwares use 2 spare TX blocks
+ * (for STA < 6.1.3.50.58 or for AP < 6.2.0.0.47)
+ */
+#define WL12XX_QUIRK_USE_2_SPARE_BLOCKS BIT(1)
+
#endif