diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-09-06 12:31:19 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-14 13:56:37 -0400 |
commit | 522376d206da66cecc90929134ad70c0446e874b (patch) | |
tree | dd475fa28731670f5810ca723c085fb2ba495344 /drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c | |
parent | 3e10caeb55b2693b38f1f80c67c79d918fc42e42 (diff) |
iwlagn: clean up of transport layer
Move a few declarations needed by the transport layer to iwl-shared.h
Move iwl_cmd_meta, iwl_tx_queue and friends to the internal transport
header file.
Move iwl_device_cmd iwl_host_cmd and friends to iwl-trans.h since
these structs are used in the API to the transport layer.
Move get_cmd_string to the upper layer with a declaration in
iwl-shared.h.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c | 92 |
1 files changed, 8 insertions, 84 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c index 32314a60e2ac..ca686dbf5893 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c | |||
@@ -30,13 +30,19 @@ | |||
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | 32 | ||
33 | #include "iwl-agn.h" | 33 | /* TODO: remove include to iwl-dev.h */ |
34 | #include "iwl-dev.h" | 34 | #include "iwl-dev.h" |
35 | #include "iwl-core.h" | 35 | #include "iwl-debug.h" |
36 | #include "iwl-csr.h" | ||
37 | #include "iwl-prph.h" | ||
36 | #include "iwl-io.h" | 38 | #include "iwl-io.h" |
39 | #include "iwl-agn-hw.h" | ||
37 | #include "iwl-helpers.h" | 40 | #include "iwl-helpers.h" |
38 | #include "iwl-trans-int-pcie.h" | 41 | #include "iwl-trans-int-pcie.h" |
39 | 42 | ||
43 | #define IWL_TX_CRC_SIZE 4 | ||
44 | #define IWL_TX_DELIMITER_SIZE 4 | ||
45 | |||
40 | /** | 46 | /** |
41 | * iwl_trans_txq_update_byte_cnt_tbl - Set up entry in Tx byte-count array | 47 | * iwl_trans_txq_update_byte_cnt_tbl - Set up entry in Tx byte-count array |
42 | */ | 48 | */ |
@@ -945,88 +951,6 @@ void iwl_tx_cmd_complete(struct iwl_trans *trans, struct iwl_rx_mem_buffer *rxb) | |||
945 | spin_unlock_irqrestore(&trans->hcmd_lock, flags); | 951 | spin_unlock_irqrestore(&trans->hcmd_lock, flags); |
946 | } | 952 | } |
947 | 953 | ||
948 | const char *get_cmd_string(u8 cmd) | ||
949 | { | ||
950 | switch (cmd) { | ||
951 | IWL_CMD(REPLY_ALIVE); | ||
952 | IWL_CMD(REPLY_ERROR); | ||
953 | IWL_CMD(REPLY_RXON); | ||
954 | IWL_CMD(REPLY_RXON_ASSOC); | ||
955 | IWL_CMD(REPLY_QOS_PARAM); | ||
956 | IWL_CMD(REPLY_RXON_TIMING); | ||
957 | IWL_CMD(REPLY_ADD_STA); | ||
958 | IWL_CMD(REPLY_REMOVE_STA); | ||
959 | IWL_CMD(REPLY_REMOVE_ALL_STA); | ||
960 | IWL_CMD(REPLY_TXFIFO_FLUSH); | ||
961 | IWL_CMD(REPLY_WEPKEY); | ||
962 | IWL_CMD(REPLY_TX); | ||
963 | IWL_CMD(REPLY_LEDS_CMD); | ||
964 | IWL_CMD(REPLY_TX_LINK_QUALITY_CMD); | ||
965 | IWL_CMD(COEX_PRIORITY_TABLE_CMD); | ||
966 | IWL_CMD(COEX_MEDIUM_NOTIFICATION); | ||
967 | IWL_CMD(COEX_EVENT_CMD); | ||
968 | IWL_CMD(REPLY_QUIET_CMD); | ||
969 | IWL_CMD(REPLY_CHANNEL_SWITCH); | ||
970 | IWL_CMD(CHANNEL_SWITCH_NOTIFICATION); | ||
971 | IWL_CMD(REPLY_SPECTRUM_MEASUREMENT_CMD); | ||
972 | IWL_CMD(SPECTRUM_MEASURE_NOTIFICATION); | ||
973 | IWL_CMD(POWER_TABLE_CMD); | ||
974 | IWL_CMD(PM_SLEEP_NOTIFICATION); | ||
975 | IWL_CMD(PM_DEBUG_STATISTIC_NOTIFIC); | ||
976 | IWL_CMD(REPLY_SCAN_CMD); | ||
977 | IWL_CMD(REPLY_SCAN_ABORT_CMD); | ||
978 | IWL_CMD(SCAN_START_NOTIFICATION); | ||
979 | IWL_CMD(SCAN_RESULTS_NOTIFICATION); | ||
980 | IWL_CMD(SCAN_COMPLETE_NOTIFICATION); | ||
981 | IWL_CMD(BEACON_NOTIFICATION); | ||
982 | IWL_CMD(REPLY_TX_BEACON); | ||
983 | IWL_CMD(WHO_IS_AWAKE_NOTIFICATION); | ||
984 | IWL_CMD(QUIET_NOTIFICATION); | ||
985 | IWL_CMD(REPLY_TX_PWR_TABLE_CMD); | ||
986 | IWL_CMD(MEASURE_ABORT_NOTIFICATION); | ||
987 | IWL_CMD(REPLY_BT_CONFIG); | ||
988 | IWL_CMD(REPLY_STATISTICS_CMD); | ||
989 | IWL_CMD(STATISTICS_NOTIFICATION); | ||
990 | IWL_CMD(REPLY_CARD_STATE_CMD); | ||
991 | IWL_CMD(CARD_STATE_NOTIFICATION); | ||
992 | IWL_CMD(MISSED_BEACONS_NOTIFICATION); | ||
993 | IWL_CMD(REPLY_CT_KILL_CONFIG_CMD); | ||
994 | IWL_CMD(SENSITIVITY_CMD); | ||
995 | IWL_CMD(REPLY_PHY_CALIBRATION_CMD); | ||
996 | IWL_CMD(REPLY_RX_PHY_CMD); | ||
997 | IWL_CMD(REPLY_RX_MPDU_CMD); | ||
998 | IWL_CMD(REPLY_RX); | ||
999 | IWL_CMD(REPLY_COMPRESSED_BA); | ||
1000 | IWL_CMD(CALIBRATION_CFG_CMD); | ||
1001 | IWL_CMD(CALIBRATION_RES_NOTIFICATION); | ||
1002 | IWL_CMD(CALIBRATION_COMPLETE_NOTIFICATION); | ||
1003 | IWL_CMD(REPLY_TX_POWER_DBM_CMD); | ||
1004 | IWL_CMD(TEMPERATURE_NOTIFICATION); | ||
1005 | IWL_CMD(TX_ANT_CONFIGURATION_CMD); | ||
1006 | IWL_CMD(REPLY_BT_COEX_PROFILE_NOTIF); | ||
1007 | IWL_CMD(REPLY_BT_COEX_PRIO_TABLE); | ||
1008 | IWL_CMD(REPLY_BT_COEX_PROT_ENV); | ||
1009 | IWL_CMD(REPLY_WIPAN_PARAMS); | ||
1010 | IWL_CMD(REPLY_WIPAN_RXON); | ||
1011 | IWL_CMD(REPLY_WIPAN_RXON_TIMING); | ||
1012 | IWL_CMD(REPLY_WIPAN_RXON_ASSOC); | ||
1013 | IWL_CMD(REPLY_WIPAN_QOS_PARAM); | ||
1014 | IWL_CMD(REPLY_WIPAN_WEPKEY); | ||
1015 | IWL_CMD(REPLY_WIPAN_P2P_CHANNEL_SWITCH); | ||
1016 | IWL_CMD(REPLY_WIPAN_NOA_NOTIFICATION); | ||
1017 | IWL_CMD(REPLY_WIPAN_DEACTIVATION_COMPLETE); | ||
1018 | IWL_CMD(REPLY_WOWLAN_PATTERNS); | ||
1019 | IWL_CMD(REPLY_WOWLAN_WAKEUP_FILTER); | ||
1020 | IWL_CMD(REPLY_WOWLAN_TSC_RSC_PARAMS); | ||
1021 | IWL_CMD(REPLY_WOWLAN_TKIP_PARAMS); | ||
1022 | IWL_CMD(REPLY_WOWLAN_KEK_KCK_MATERIAL); | ||
1023 | IWL_CMD(REPLY_WOWLAN_GET_STATUS); | ||
1024 | default: | ||
1025 | return "UNKNOWN"; | ||
1026 | |||
1027 | } | ||
1028 | } | ||
1029 | |||
1030 | #define HOST_COMPLETE_TIMEOUT (2 * HZ) | 954 | #define HOST_COMPLETE_TIMEOUT (2 * HZ) |
1031 | 955 | ||
1032 | static void iwl_generic_cmd_callback(struct iwl_shared *shrd, | 956 | static void iwl_generic_cmd_callback(struct iwl_shared *shrd, |