summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/host.h
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2007-08-02 11:53:36 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:49:53 -0700
commit6b63cd0f420c3c3002024da6c9eff252a3772021 (patch)
tree87df4e20432a393b9137952a4ad6aa0cc63163b5 /drivers/net/wireless/libertas/host.h
parentece561919326236c7fb791a5e883f0eb76af029e (diff)
[PATCH] libertas: remove a hundred CMD_RET_xxx definitions
types.h contains the same amount of CMD_RET_xxx and CMD_xxx definitions. They contains the same info: the firmware command opcode and, when the firmware sends back a result, the command opcode ORed with 0x8000. Having the same data twice in the source code is redundant and can lead to errors (e.g. if you update or delete only one instance). This patch removed all CMD_RET_xxx definitions and introduces a simple CMD_RET() macro. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/host.h')
-rw-r--r--drivers/net/wireless/libertas/host.h87
1 files changed, 11 insertions, 76 deletions
diff --git a/drivers/net/wireless/libertas/host.h b/drivers/net/wireless/libertas/host.h
index 12d5dd9af40..c6b44c83159 100644
--- a/drivers/net/wireless/libertas/host.h
+++ b/drivers/net/wireless/libertas/host.h
@@ -22,7 +22,17 @@
#define CMD_OPTION_WAITFORRSP 0x0002
-/** Host command ID */
+/** Host command IDs */
+
+/* Return command are almost always the same as the host command, but with
+ * bit 15 set high. There are a few exceptions, though...
+ */
+#define CMD_RET(cmd) (0x8000 | cmd)
+
+/* Return command convention exceptions: */
+#define CMD_RET_802_11_ASSOCIATE 0x8012
+
+/* Command codes */
#define CMD_CODE_DNLD 0x0002
#define CMD_GET_HW_SPEC 0x0003
#define CMD_EEPROM_UPDATE 0x0004
@@ -97,13 +107,10 @@
#define CMD_GET_TSF 0x0080
#define CMD_BT_ACCESS 0x0087
-#define CMD_RET_BT_ACCESS 0x8087
#define CMD_FWT_ACCESS 0x0095
-#define CMD_RET_FWT_ACCESS 0x8095
#define CMD_MESH_ACCESS 0x009b
-#define CMD_RET_MESH_ACCESS 0x809b
/* For the IEEE Power Save */
#define CMD_SUBCMD_ENTER_PS 0x0030
@@ -112,46 +119,6 @@
#define CMD_SUBCMD_FULL_POWERDOWN 0x0035
#define CMD_SUBCMD_FULL_POWERUP 0x0036
-/* command RET code, MSB is set to 1 */
-#define CMD_RET_HW_SPEC_INFO 0x8003
-#define CMD_RET_EEPROM_UPDATE 0x8004
-#define CMD_RET_802_11_RESET 0x8005
-#define CMD_RET_802_11_SCAN 0x8006
-#define CMD_RET_802_11_GET_LOG 0x800b
-#define CMD_RET_MAC_CONTROL 0x8028
-#define CMD_RET_MAC_MULTICAST_ADR 0x8010
-#define CMD_RET_802_11_AUTHENTICATE 0x8011
-#define CMD_RET_802_11_DEAUTHENTICATE 0x8024
-#define CMD_RET_802_11_ASSOCIATE 0x8012
-#define CMD_RET_802_11_REASSOCIATE 0x8025
-#define CMD_RET_802_11_DISASSOCIATE 0x8026
-#define CMD_RET_802_11_SET_WEP 0x8013
-#define CMD_RET_802_11_STAT 0x8014
-#define CMD_RET_802_3_STAT 0x8015
-#define CMD_RET_802_11_SNMP_MIB 0x8016
-#define CMD_RET_MAC_REG_MAP 0x8017
-#define CMD_RET_BBP_REG_MAP 0x8018
-#define CMD_RET_RF_REG_MAP 0x8023
-#define CMD_RET_MAC_REG_ACCESS 0x8019
-#define CMD_RET_BBP_REG_ACCESS 0x801a
-#define CMD_RET_RF_REG_ACCESS 0x801b
-#define CMD_RET_802_11_RADIO_CONTROL 0x801c
-#define CMD_RET_802_11_RF_CHANNEL 0x801d
-#define CMD_RET_802_11_RSSI 0x801f
-#define CMD_RET_802_11_RF_TX_POWER 0x801e
-#define CMD_RET_802_11_RF_ANTENNA 0x8020
-#define CMD_RET_802_11_PS_MODE 0x8021
-#define CMD_RET_802_11_DATA_RATE 0x8022
-
-#define CMD_RET_802_11_AD_HOC_START 0x802B
-#define CMD_RET_802_11_AD_HOC_JOIN 0x802C
-
-#define CMD_RET_802_11_QUERY_TKIP_REPLY_CNTRS 0x802e
-#define CMD_RET_802_11_ENABLE_RSN 0x802f
-#define CMD_RET_802_11_PAIRWISE_TSC 0x8036
-#define CMD_RET_802_11_GROUP_TSC 0x8037
-#define CMD_RET_802_11_KEY_MATERIAL 0x805e
-
#define CMD_ENABLE_RSN 0x0001
#define CMD_DISABLE_RSN 0x0000
@@ -162,38 +129,6 @@
#define CMD_ACT_SET_AES (CMD_ACT_SET + 2)
#define CMD_ACT_REMOVE_AES (CMD_ACT_SET + 3)
-#define CMD_RET_802_11_SET_AFC 0x803c
-#define CMD_RET_802_11_GET_AFC 0x803d
-
-#define CMD_RET_802_11_AD_HOC_STOP 0x8040
-
-#define CMD_RET_802_11_BEACON_STOP 0x8049
-
-#define CMD_RET_802_11_MAC_ADDRESS 0x804D
-#define CMD_RET_802_11_EEPROM_ACCESS 0x8059
-
-#define CMD_RET_802_11_BAND_CONFIG 0x8058
-
-#define CMD_RET_802_11_SLEEP_PARAMS 0x8066
-
-#define CMD_RET_802_11_INACTIVITY_TIMEOUT 0x8067
-
-#define CMD_RET_802_11D_DOMAIN_INFO (0x8000 | \
- CMD_802_11D_DOMAIN_INFO)
-
-#define CMD_RET_802_11_TPC_CFG (CMD_802_11_TPC_CFG | 0x8000)
-#define CMD_RET_802_11_PWR_CFG (CMD_802_11_PWR_CFG | 0x8000)
-
-#define CMD_RET_802_11_LED_GPIO_CTRL 0x804e
-
-#define CMD_RET_802_11_SUBSCRIBE_EVENT (CMD_802_11_SUBSCRIBE_EVENT | 0x8000)
-
-#define CMD_RET_802_11_RATE_ADAPT_RATESET (CMD_802_11_RATE_ADAPT_RATESET | 0x8000)
-
-#define CMD_RTE_802_11_TX_RATE_QUERY (CMD_802_11_TX_RATE_QUERY | 0x8000)
-
-#define CMD_RET_GET_TSF 0x8080
-
/* Define action or option for CMD_802_11_SET_WEP */
#define CMD_ACT_ADD 0x0002
#define CMD_ACT_REMOVE 0x0004