aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJay Sternberg <jay.e.sternberg@linux.intel.com>2009-01-29 14:09:15 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-09 15:03:42 -0500
commite8c00dcb028a1b702863c3a454315c7ae5f544e7 (patch)
treee0f7c44ca45815140b2e0ddc8d952d9fb6956855 /drivers/net
parent76a2407a5b043d0950d5657184118e89860d545c (diff)
iwlwifi: define structures and functions externally for customization
defined the structures and functions as extern to alter behavior used by 5000 series for other products including 100 and 6000 series Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c14
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h12
2 files changed, 19 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 17aaca8dad1f..e3cba61d1543 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -394,7 +394,7 @@ static void iwl5000_chain_noise_reset(struct iwl_priv *priv)
394 } 394 }
395} 395}
396 396
397static void iwl5000_rts_tx_cmd_flag(struct ieee80211_tx_info *info, 397void iwl5000_rts_tx_cmd_flag(struct ieee80211_tx_info *info,
398 __le32 *tx_flags) 398 __le32 *tx_flags)
399{ 399{
400 if ((info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) || 400 if ((info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) ||
@@ -1105,7 +1105,7 @@ static int iwl5000_txq_agg_disable(struct iwl_priv *priv, u16 txq_id,
1105 return 0; 1105 return 0;
1106} 1106}
1107 1107
1108static u16 iwl5000_build_addsta_hcmd(const struct iwl_addsta_cmd *cmd, u8 *data) 1108u16 iwl5000_build_addsta_hcmd(const struct iwl_addsta_cmd *cmd, u8 *data)
1109{ 1109{
1110 u16 size = (u16)sizeof(struct iwl_addsta_cmd); 1110 u16 size = (u16)sizeof(struct iwl_addsta_cmd);
1111 memcpy(data, cmd, size); 1111 memcpy(data, cmd, size);
@@ -1334,7 +1334,7 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
1334} 1334}
1335 1335
1336/* Currently 5000 is the superset of everything */ 1336/* Currently 5000 is the superset of everything */
1337static u16 iwl5000_get_hcmd_size(u8 cmd_id, u16 len) 1337u16 iwl5000_get_hcmd_size(u8 cmd_id, u16 len)
1338{ 1338{
1339 return len; 1339 return len;
1340} 1340}
@@ -1435,7 +1435,7 @@ static void iwl5000_temperature(struct iwl_priv *priv)
1435} 1435}
1436 1436
1437/* Calc max signal level (dBm) among 3 possible receivers */ 1437/* Calc max signal level (dBm) among 3 possible receivers */
1438static int iwl5000_calc_rssi(struct iwl_priv *priv, 1438int iwl5000_calc_rssi(struct iwl_priv *priv,
1439 struct iwl_rx_phy_res *rx_resp) 1439 struct iwl_rx_phy_res *rx_resp)
1440{ 1440{
1441 /* data from PHY/DSP regarding signal strength, etc., 1441 /* data from PHY/DSP regarding signal strength, etc.,
@@ -1472,11 +1472,11 @@ static int iwl5000_calc_rssi(struct iwl_priv *priv,
1472 return max_rssi - agc - IWL49_RSSI_OFFSET; 1472 return max_rssi - agc - IWL49_RSSI_OFFSET;
1473} 1473}
1474 1474
1475static struct iwl_hcmd_ops iwl5000_hcmd = { 1475struct iwl_hcmd_ops iwl5000_hcmd = {
1476 .rxon_assoc = iwl5000_send_rxon_assoc, 1476 .rxon_assoc = iwl5000_send_rxon_assoc,
1477}; 1477};
1478 1478
1479static struct iwl_hcmd_utils_ops iwl5000_hcmd_utils = { 1479struct iwl_hcmd_utils_ops iwl5000_hcmd_utils = {
1480 .get_hcmd_size = iwl5000_get_hcmd_size, 1480 .get_hcmd_size = iwl5000_get_hcmd_size,
1481 .build_addsta_hcmd = iwl5000_build_addsta_hcmd, 1481 .build_addsta_hcmd = iwl5000_build_addsta_hcmd,
1482 .gain_computation = iwl5000_gain_computation, 1482 .gain_computation = iwl5000_gain_computation,
@@ -1485,7 +1485,7 @@ static struct iwl_hcmd_utils_ops iwl5000_hcmd_utils = {
1485 .calc_rssi = iwl5000_calc_rssi, 1485 .calc_rssi = iwl5000_calc_rssi,
1486}; 1486};
1487 1487
1488static struct iwl_lib_ops iwl5000_lib = { 1488struct iwl_lib_ops iwl5000_lib = {
1489 .set_hw_params = iwl5000_hw_set_hw_params, 1489 .set_hw_params = iwl5000_hw_set_hw_params,
1490 .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl, 1490 .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl,
1491 .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl, 1491 .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl,
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index b9954bc89cf2..afde713c806f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -67,6 +67,18 @@ extern struct iwl_cfg iwl100_bgn_cfg;
67/* shared structures from iwl-5000.c */ 67/* shared structures from iwl-5000.c */
68extern struct iwl_mod_params iwl50_mod_params; 68extern struct iwl_mod_params iwl50_mod_params;
69extern struct iwl_ops iwl5000_ops; 69extern struct iwl_ops iwl5000_ops;
70extern struct iwl_lib_ops iwl5000_lib;
71extern struct iwl_hcmd_ops iwl5000_hcmd;
72extern struct iwl_hcmd_utils_ops iwl5000_hcmd_utils;
73
74/* shared functions from iwl-5000.c */
75extern u16 iwl5000_get_hcmd_size(u8 cmd_id, u16 len);
76extern u16 iwl5000_build_addsta_hcmd(const struct iwl_addsta_cmd *cmd,
77 u8 *data);
78extern void iwl5000_rts_tx_cmd_flag(struct ieee80211_tx_info *info,
79 __le32 *tx_flags);
80extern int iwl5000_calc_rssi(struct iwl_priv *priv,
81 struct iwl_rx_phy_res *rx_resp);
70 82
71/* CT-KILL constants */ 83/* CT-KILL constants */
72#define CT_KILL_THRESHOLD 110 /* in Celsius */ 84#define CT_KILL_THRESHOLD 110 /* in Celsius */