summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-shared.h
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-08-25 23:10:39 -0700
committerJohn W. Linville <linville@tuxdriver.com>2011-08-29 15:25:30 -0400
commitd618912417fbce4f6514fe1cbef7df2e73bdb6c2 (patch)
treee14bf2a7a09d898431cd0bac6d8b38318cb6dc48 /drivers/net/wireless/iwlwifi/iwl-shared.h
parent8f470ce31de1a9dfe6b53e0967eaa7e72b741714 (diff)
downloadlwn-d618912417fbce4f6514fe1cbef7df2e73bdb6c2.tar.gz
lwn-d618912417fbce4f6514fe1cbef7df2e73bdb6c2.zip
iwlagn: hw_params moves to iwl_shared
Since it is used by all the layers, it needs to move to iwl_shared. 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-shared.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-shared.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h
index a7c0315472e9..483785c3fb04 100644
--- a/drivers/net/wireless/iwlwifi/iwl-shared.h
+++ b/drivers/net/wireless/iwlwifi/iwl-shared.h
@@ -66,6 +66,7 @@
struct iwl_cfg;
struct iwl_bus;
struct iwl_priv;
+struct iwl_sensitivity_ranges;
extern struct iwl_mod_params iwlagn_mod_params;
@@ -91,12 +92,60 @@ struct iwl_mod_params {
};
/**
+ * struct iwl_hw_params
+ * @max_txq_num: Max # Tx queues supported
+ * @scd_bc_tbls_size: size of scheduler byte count tables
+ * @tfd_size: TFD size
+ * @tx/rx_chains_num: Number of TX/RX chains
+ * @valid_tx/rx_ant: usable antennas
+ * @max_rxq_size: Max # Rx frames in Rx queue (must be power-of-2)
+ * @max_rxq_log: Log-base-2 of max_rxq_size
+ * @rx_page_order: Rx buffer page order
+ * @rx_wrt_ptr_reg: FH{39}_RSCSR_CHNL0_WPTR
+ * @max_stations:
+ * @ht40_channel: is 40MHz width possible in band 2.4
+ * BIT(IEEE80211_BAND_5GHZ) BIT(IEEE80211_BAND_5GHZ)
+ * @sw_crypto: 0 for hw, 1 for sw
+ * @max_xxx_size: for ucode uses
+ * @ct_kill_threshold: temperature threshold
+ * @beacon_time_tsf_bits: number of valid tsf bits for beacon time
+ * @calib_init_cfg: setup initial calibrations for the hw
+ * @calib_rt_cfg: setup runtime calibrations for the hw
+ * @struct iwl_sensitivity_ranges: range of sensitivity values
+ */
+struct iwl_hw_params {
+ u8 max_txq_num;
+ u16 scd_bc_tbls_size;
+ u32 tfd_size;
+ u8 tx_chains_num;
+ u8 rx_chains_num;
+ u8 valid_tx_ant;
+ u8 valid_rx_ant;
+ u16 max_rxq_size;
+ u16 max_rxq_log;
+ u32 rx_page_order;
+ u8 max_stations;
+ u8 ht40_channel;
+ u8 max_beacon_itrvl; /* in 1024 ms */
+ u32 max_inst_size;
+ u32 max_data_size;
+ u32 ct_kill_threshold; /* value in hw-dependent units */
+ u32 ct_kill_exit_threshold; /* value in hw-dependent units */
+ /* for 1000, 6000 series and up */
+ u16 beacon_time_tsf_bits;
+ u32 calib_init_cfg;
+ u32 calib_rt_cfg;
+ const struct iwl_sensitivity_ranges *sens;
+};
+
+/**
* struct iwl_shared - shared fields for all the layers of the driver
*
* @dbg_level_dev: dbg level set per device. Prevails on
* iwlagn_mod_params.debug_level if set (!= 0)
* @bus: pointer to the bus layer data
* @priv: pointer to the upper layer data
+ * @hw_params: see struct iwl_hw_params
*/
struct iwl_shared {
#ifdef CONFIG_IWLWIFI_DEBUG
@@ -105,11 +154,13 @@ struct iwl_shared {
struct iwl_bus *bus;
struct iwl_priv *priv;
+ struct iwl_hw_params hw_params;
};
/*Whatever _m is (iwl_trans, iwl_priv, iwl_bus, these macros will work */
#define priv(_m) ((_m)->shrd->priv)
#define bus(_m) ((_m)->shrd->bus)
+#define hw_params(_m) ((_m)->shrd->hw_params)
#ifdef CONFIG_IWLWIFI_DEBUG
/*