提交 c496294e 编写于 作者: S Samuel Ortiz 提交者: John W. Linville

iwl3945: switch to the iwl-core send_card_state routine

Switch iwl3945 to use iwl-core:send_card_state routine.
Signed-off-by: NSamuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: NAbhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: NZhu Yi <yi.zhu@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 188cf6c7
...@@ -1368,7 +1368,7 @@ EXPORT_SYMBOL(iwl_rf_kill_ct_config); ...@@ -1368,7 +1368,7 @@ EXPORT_SYMBOL(iwl_rf_kill_ct_config);
* When in the 'halt' state, the card is shut down and must be fully * When in the 'halt' state, the card is shut down and must be fully
* restarted to come back on. * restarted to come back on.
*/ */
static int iwl_send_card_state(struct iwl_priv *priv, u32 flags, u8 meta_flag) int iwl_send_card_state(struct iwl_priv *priv, u32 flags, u8 meta_flag)
{ {
struct iwl_host_cmd cmd = { struct iwl_host_cmd cmd = {
.id = REPLY_CARD_STATE_CMD, .id = REPLY_CARD_STATE_CMD,
...@@ -1379,6 +1379,7 @@ static int iwl_send_card_state(struct iwl_priv *priv, u32 flags, u8 meta_flag) ...@@ -1379,6 +1379,7 @@ static int iwl_send_card_state(struct iwl_priv *priv, u32 flags, u8 meta_flag)
return iwl_send_cmd(priv, &cmd); return iwl_send_cmd(priv, &cmd);
} }
EXPORT_SYMBOL(iwl_send_card_state);
void iwl_radio_kill_sw_disable_radio(struct iwl_priv *priv) void iwl_radio_kill_sw_disable_radio(struct iwl_priv *priv)
{ {
......
...@@ -342,6 +342,9 @@ int iwl_send_cmd_pdu_async(struct iwl_priv *priv, u8 id, u16 len, ...@@ -342,6 +342,9 @@ int iwl_send_cmd_pdu_async(struct iwl_priv *priv, u8 id, u16 len,
int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd); int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd);
int iwl_send_card_state(struct iwl_priv *priv, u32 flags,
u8 meta_flag);
/***************************************************** /*****************************************************
* PCI * * PCI *
*****************************************************/ *****************************************************/
......
...@@ -1076,38 +1076,6 @@ static int iwl3945_send_scan_abort(struct iwl_priv *priv) ...@@ -1076,38 +1076,6 @@ static int iwl3945_send_scan_abort(struct iwl_priv *priv)
return rc; return rc;
} }
static int iwl3945_card_state_sync_callback(struct iwl_priv *priv,
struct iwl_cmd *cmd,
struct sk_buff *skb)
{
return 1;
}
/*
* CARD_STATE_CMD
*
* Use: Sets the device's internal card state to enable, disable, or halt
*
* When in the 'enable' state the card operates as normal.
* When in the 'disable' state, the card enters into a low power mode.
* When in the 'halt' state, the card is shut down and must be fully
* restarted to come back on.
*/
static int iwl3945_send_card_state(struct iwl_priv *priv, u32 flags, u8 meta_flag)
{
struct iwl_host_cmd cmd = {
.id = REPLY_CARD_STATE_CMD,
.len = sizeof(u32),
.data = &flags,
.meta.flags = meta_flag,
};
if (meta_flag & CMD_ASYNC)
cmd.meta.u.callback = iwl3945_card_state_sync_callback;
return iwl3945_send_cmd(priv, &cmd);
}
static int iwl3945_add_sta_sync_callback(struct iwl_priv *priv, static int iwl3945_add_sta_sync_callback(struct iwl_priv *priv,
struct iwl_cmd *cmd, struct sk_buff *skb) struct iwl_cmd *cmd, struct sk_buff *skb)
{ {
...@@ -2545,7 +2513,7 @@ static void iwl3945_radio_kill_sw(struct iwl_priv *priv, int disable_radio) ...@@ -2545,7 +2513,7 @@ static void iwl3945_radio_kill_sw(struct iwl_priv *priv, int disable_radio)
iwl_write32(priv, CSR_UCODE_DRV_GP1_SET, iwl_write32(priv, CSR_UCODE_DRV_GP1_SET,
CSR_UCODE_SW_BIT_RFKILL); CSR_UCODE_SW_BIT_RFKILL);
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
iwl3945_send_card_state(priv, CARD_STATE_CMD_DISABLE, 0); iwl_send_card_state(priv, CARD_STATE_CMD_DISABLE, 0);
set_bit(STATUS_RF_KILL_SW, &priv->status); set_bit(STATUS_RF_KILL_SW, &priv->status);
} }
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册