[PATCH 5/6] libertas: remove dead #defines and struct's
Holger Schurig
hs4233 at mail.mn-solutions.de
Tue Jun 19 07:54:21 EDT 2007
From: Holger Schurig <hs4233 at mail.mn-solutions.de>
Signed-off-by: Holger Schurig <hs4233 at mail.mn-solutions.de>
---
drivers/net/wireless/libertas/defs.h | 28 +++--------------
drivers/net/wireless/libertas/dev.h | 6 ----
drivers/net/wireless/libertas/host.h | 56 +---------------------------------
3 files changed, 7 insertions(+), 83 deletions(-)
diff --git a/drivers/net/wireless/libertas/defs.h b/drivers/net/wireless/libertas/defs.h
index 5191fb5..9c4a646 100644
--- a/drivers/net/wireless/libertas/defs.h
+++ b/drivers/net/wireless/libertas/defs.h
@@ -126,7 +126,6 @@ static inline void lbs_dbg_hex(char *prompt, u8 * buf, int len)
#define MRVDRV_MAX_MULTICAST_LIST_SIZE 32
#define MRVDRV_NUM_OF_CMD_BUFFER 10
#define MRVDRV_SIZE_OF_CMD_BUFFER (2 * 1024)
-#define MRVDRV_MAX_CHANNEL_SIZE 14
#define MRVDRV_ASSOCIATION_TIME_OUT 255
#define MRVDRV_SNAP_HEADER_LEN 8
@@ -136,19 +135,16 @@ static inline void lbs_dbg_hex(char *prompt, u8 * buf, int len)
/** Misc constants */
/* This section defines 802.11 specific contants */
-#define MRVDRV_MAX_BSS_DESCRIPTS 16
-#define MRVDRV_MAX_REGION_CODE 6
-
+/** Used for cmd_subcmd_enter_ps */
#define MRVDRV_IGNORE_MULTIPLE_DTIM 0xfffe
#define MRVDRV_MIN_MULTIPLE_DTIM 1
#define MRVDRV_MAX_MULTIPLE_DTIM 5
#define MRVDRV_DEFAULT_MULTIPLE_DTIM 1
+/** Used for associate command */
#define MRVDRV_DEFAULT_LISTEN_INTERVAL 10
-#define MRVDRV_CHANNELS_PER_SCAN 4
-#define MRVDRV_MAX_CHANNELS_PER_SCAN 14
-
+/** Beacon interval in ADHOC mode */
#define MRVDRV_MIN_BEACON_INTERVAL 20
#define MRVDRV_MAX_BEACON_INTERVAL 1000
#define MRVDRV_BEACON_INTERVAL 100
@@ -158,17 +154,6 @@ static inline void lbs_dbg_hex(char *prompt, u8 * buf, int len)
#define his_cardevent 0x02
#define his_cmdupldrdy 0x04
-#define SBI_EVENT_CAUSE_SHIFT 3
-
-/** TxPD status */
-
-/* Station firmware use TxPD status field to report final Tx transmit
-* result, Bit masks are used to present combined situations.
-*/
-
-#define MRVDRV_TxPD_POWER_MGMT_NULL_PACKET 0x01
-#define MRVDRV_TxPD_POWER_MGMT_LAST_PACKET 0x08
-
/** Tx mesh flag */
/* Currently we are using normal WDS flag as mesh flag.
* TODO: change to proper mesh flag when MAC understands it.
@@ -229,7 +214,6 @@ static inline void lbs_dbg_hex(char *prompt, u8 * buf, int len)
#define BAND_B (0x01)
#define BAND_G (0x02)
-#define ALL_802_11_BANDS (BAND_B | BAND_G)
/** MACRO DEFINITIONS */
#define CAL_NF(NF) ((s32)(-(s32)(NF)))
@@ -239,10 +223,6 @@ static inline void lbs_dbg_hex(char *prompt, u8 * buf, int len)
#define DEFAULT_BCN_AVG_FACTOR 8
#define DEFAULT_DATA_AVG_FACTOR 8
#define AVG_SCALE 100
-#define CAL_AVG_SNR_NF(AVG, SNRNF, N) \
- (((AVG) == 0) ? ((u16)(SNRNF) * AVG_SCALE) : \
- ((((int)(AVG) * (N -1)) + ((u16)(SNRNF) * \
- AVG_SCALE)) / N))
#define B_SUPPORTED_RATES 8
#define G_SUPPORTED_RATES 14
@@ -259,6 +239,8 @@ static inline void lbs_dbg_hex(char *prompt, u8 * buf, int len)
typedef struct _wlan_private wlan_private;
typedef struct _wlan_adapter wlan_adapter;
extern const char libertas_driver_version[];
+
+#define MRVDRV_MAX_REGION_CODE 6
extern u16 libertas_region_code_to_index[MRVDRV_MAX_REGION_CODE];
extern u8 libertas_supported_rates[G_SUPPORTED_RATES];
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index 0169838..0d07c6c 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -22,12 +22,6 @@ extern struct ethtool_ops libertas_ethtool_ops;
#define NR_TX_QUEUE 3
-/* For the extended Scan */
-#define MAX_EXTENDED_SCAN_BSSID_LIST MAX_BSSID_PER_CHANNEL * \
- MRVDRV_MAX_CHANNEL_SIZE + 1
-
-#define MAX_REGION_CHANNEL_NUM 2
-
/** Chan-freq-TxPower mapping table*/
struct chan_freq_power {
/** channel Number */
diff --git a/drivers/net/wireless/libertas/host.h b/drivers/net/wireless/libertas/host.h
index 7509cc1..a86ff59 100644
--- a/drivers/net/wireless/libertas/host.h
+++ b/drivers/net/wireless/libertas/host.h
@@ -7,16 +7,12 @@
/** PUBLIC DEFINITIONS */
#define DEFAULT_AD_HOC_CHANNEL 6
-#define DEFAULT_AD_HOC_CHANNEL_A 36
/** IEEE 802.11 oids */
#define OID_802_11_SSID 0x00008002
#define OID_802_11_INFRASTRUCTURE_MODE 0x00008008
#define OID_802_11_FRAGMENTATION_THRESHOLD 0x00008009
#define OID_802_11_RTS_THRESHOLD 0x0000800A
-#define OID_802_11_TX_ANTENNA_SELECTED 0x0000800D
-#define OID_802_11_SUPPORTED_RATES 0x0000800E
-#define OID_802_11_STATISTICS 0x00008012
#define OID_802_11_TX_RETRYCOUNT 0x0000801D
#define OID_802_11D_ENABLE 0x00008020
@@ -25,7 +21,6 @@
/** Host command ID */
#define cmd_code_dnld 0x0002
#define cmd_get_hw_spec 0x0003
-#define cmd_eeprom_update 0x0004
#define cmd_802_11_reset 0x0005
#define cmd_802_11_scan 0x0006
#define cmd_802_11_get_log 0x000b
@@ -35,10 +30,7 @@
#define cmd_802_11_associate 0x0050
#define cmd_802_11_set_wep 0x0013
#define cmd_802_11_get_stat 0x0014
-#define cmd_802_3_get_stat 0x0015
#define cmd_802_11_snmp_mib 0x0016
-#define cmd_mac_reg_map 0x0017
-#define cmd_bbp_reg_map 0x0018
#define cmd_mac_reg_access 0x0019
#define cmd_bbp_reg_access 0x001a
#define cmd_rf_reg_access 0x001b
@@ -47,19 +39,14 @@
#define cmd_802_11_rf_tx_power 0x001e
#define cmd_802_11_rssi 0x001f
#define cmd_802_11_rf_antenna 0x0020
-
#define cmd_802_11_ps_mode 0x0021
-
#define cmd_802_11_data_rate 0x0022
-#define cmd_rf_reg_map 0x0023
#define cmd_802_11_deauthenticate 0x0024
#define cmd_802_11_reassociate 0x0025
-#define cmd_802_11_disassociate 0x0026
#define cmd_mac_control 0x0028
#define cmd_802_11_ad_hoc_start 0x002b
#define cmd_802_11_ad_hoc_join 0x002c
-#define cmd_802_11_query_tkip_reply_cntrs 0x002e
#define cmd_802_11_enable_rsn 0x002f
#define cmd_802_11_pairwise_tsc 0x0036
#define cmd_802_11_group_tsc 0x0037
@@ -70,13 +57,9 @@
#define cmd_802_11_ad_hoc_stop 0x0040
-#define cmd_802_11_beacon_stop 0x0049
-
#define cmd_802_11_mac_address 0x004D
#define cmd_802_11_eeprom_access 0x0059
-#define cmd_802_11_band_config 0x0058
-
#define cmd_802_11d_domain_info 0x005b
#define cmd_802_11_sleep_params 0x0066
@@ -109,12 +92,9 @@
#define cmd_subcmd_enter_ps 0x0030
#define cmd_subcmd_exit_ps 0x0031
#define cmd_subcmd_sleep_confirmed 0x0034
-#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
@@ -127,11 +107,7 @@
#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
@@ -146,10 +122,7 @@
#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
@@ -158,10 +131,6 @@
#define cmd_act_set 0x0001
#define cmd_act_get 0x0000
-#define cmd_act_get_AES (cmd_act_get + 2)
-#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
@@ -172,8 +141,6 @@
#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
@@ -197,13 +164,10 @@
/* Define action or option for cmd_802_11_set_wep */
#define cmd_act_add 0x0002
#define cmd_act_remove 0x0004
-#define cmd_act_use_default 0x0008
#define cmd_type_wep_40_bit 0x0001
#define cmd_type_wep_104_bit 0x0002
-#define cmd_NUM_OF_WEP_KEYS 4
-
#define cmd_WEP_KEY_INDEX_MASK 0x3fff
/* Define action or option for cmd_802_11_reset */
@@ -225,14 +189,10 @@
/* Define action or option for cmd_mac_control */
#define cmd_act_mac_rx_on 0x0001
#define cmd_act_mac_tx_on 0x0002
-#define cmd_act_mac_loopback_on 0x0004
#define cmd_act_mac_wep_enable 0x0008
-#define cmd_act_mac_int_enable 0x0010
#define cmd_act_mac_multicast_enable 0x0020
-#define cmd_act_mac_broadcast_enable 0x0040
#define cmd_act_mac_promiscuous_enable 0x0080
#define cmd_act_mac_all_multicast_enable 0x0100
-#define cmd_act_mac_strict_protection_enable 0x0400
/* Define action or option for cmd_802_11_radio_control */
#define cmd_type_auto_preamble 0x0001
@@ -259,7 +219,6 @@
#define cmd_act_tx_power_index_high 0x0007
#define cmd_act_tx_power_index_mid 0x0004
-#define cmd_act_tx_power_index_low 0x0000
/* Define action or option for cmd_802_11_data_rate */
#define cmd_act_set_tx_auto 0x0000
@@ -268,15 +227,8 @@
#define cmd_act_set_rx 0x0001
#define cmd_act_set_tx 0x0002
-#define cmd_act_set_both 0x0003
#define cmd_act_get_rx 0x0004
#define cmd_act_get_tx 0x0008
-#define cmd_act_get_both 0x000c
-
-/* Define action or option for cmd_802_11_ps_mode */
-#define cmd_type_cam 0x0000
-#define cmd_type_max_psp 0x0001
-#define cmd_type_fast_psp 0x0002
/* Define action or option for cmd_bt_access */
enum cmd_bt_access_opts {
@@ -315,12 +267,9 @@ enum cmd_mesh_access_opts {
};
/** Card Event definition */
-#define MACREG_INT_CODE_TX_PPA_FREE 0x00000000
-#define MACREG_INT_CODE_TX_DMA_DONE 0x00000001
-#define MACREG_INT_CODE_LINK_LOSE_W_SCAN 0x00000002
+#define SBI_EVENT_CAUSE_SHIFT 3
#define MACREG_INT_CODE_LINK_LOSE_NO_SCAN 0x00000003
#define MACREG_INT_CODE_LINK_SENSED 0x00000004
-#define MACREG_INT_CODE_CMD_FINISHED 0x00000005
#define MACREG_INT_CODE_MIB_CHANGED 0x00000006
#define MACREG_INT_CODE_INIT_DONE 0x00000007
#define MACREG_INT_CODE_DEAUTHENTICATED 0x00000008
@@ -329,7 +278,6 @@ enum cmd_mesh_access_opts {
#define MACREG_INT_CODE_PS_SLEEP 0x0000000b
#define MACREG_INT_CODE_MIC_ERR_MULTICAST 0x0000000d
#define MACREG_INT_CODE_MIC_ERR_UNICAST 0x0000000e
-#define MACREG_INT_CODE_WM_AWAKE 0x0000000f
#define MACREG_INT_CODE_ADHOC_BCN_LOST 0x00000011
#define MACREG_INT_CODE_RSSI_LOW 0x00000019
#define MACREG_INT_CODE_SNR_LOW 0x0000001a
@@ -338,4 +286,4 @@ enum cmd_mesh_access_opts {
#define MACREG_INT_CODE_SNR_HIGH 0x0000001d
#define MACREG_INT_CODE_MESH_AUTO_STARTED 0x00000023
-#endif /* _HOST_H_ */
+#endif
More information about the libertas-dev
mailing list