Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 301025
b: refs/heads/master
c: 01d651d
h: refs/heads/master
i:
  301023: 5f5f61d
v: v3
  • Loading branch information
Don Fry authored and Wey-Yi Guy committed Apr 16, 2012
1 parent 8d781aa commit 13ad43d
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f8c6c6b56fa367d9a3864b922ad659dddf2688a4
refs/heads/master: 01d651d4b7f40c90821e104963dc04800fbde8cf
18 changes: 18 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,24 @@ extern struct iwl_lib_ops iwl6030_lib;



/*****************************************************
* DRIVER STATUS FUNCTIONS
******************************************************/
#define STATUS_RF_KILL_HW 0
#define STATUS_CT_KILL 1
#define STATUS_ALIVE 2
#define STATUS_READY 3
#define STATUS_GEO_CONFIGURED 4
#define STATUS_EXIT_PENDING 5
#define STATUS_STATISTICS 6
#define STATUS_SCANNING 7
#define STATUS_SCAN_ABORTING 8
#define STATUS_SCAN_HW 9
#define STATUS_FW_ERROR 10
#define STATUS_CHANNEL_SWITCH_PENDING 11
#define STATUS_SCAN_COMPLETE 12
#define STATUS_POWER_PMI 13

struct iwl_ucode_capabilities;

extern struct ieee80211_ops iwlagn_hw_ops;
Expand Down
24 changes: 0 additions & 24 deletions trunk/drivers/net/wireless/iwlwifi/iwl-shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,28 +185,4 @@ const char *get_cmd_string(u8 cmd);

#define IWL_CMD(x) case x: return #x

/*****************************************************
* DRIVER STATUS FUNCTIONS
******************************************************/
#define STATUS_HCMD_ACTIVE 0 /* host command in progress */
/* 1 is unused (used to be STATUS_HCMD_SYNC_ACTIVE) */
#define STATUS_INT_ENABLED 2
#define STATUS_RF_KILL_HW 3
#define STATUS_CT_KILL 4
#define STATUS_INIT 5
#define STATUS_ALIVE 6
#define STATUS_READY 7
#define STATUS_TEMPERATURE 8
#define STATUS_GEO_CONFIGURED 9
#define STATUS_EXIT_PENDING 10
#define STATUS_STATISTICS 12
#define STATUS_SCANNING 13
#define STATUS_SCAN_ABORTING 14
#define STATUS_SCAN_HW 15
#define STATUS_POWER_PMI 16
#define STATUS_FW_ERROR 17
#define STATUS_DEVICE_ENABLED 18
#define STATUS_CHANNEL_SWITCH_PENDING 19
#define STATUS_SCAN_COMPLETE 20

#endif /* #__iwl_shared_h__ */
8 changes: 8 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,14 @@ struct iwl_trans_pcie {
unsigned long wd_timeout;
};

/*****************************************************
* DRIVER STATUS FUNCTIONS
******************************************************/
#define STATUS_HCMD_ACTIVE 0
#define STATUS_DEVICE_ENABLED 1
#define STATUS_TPOWER_PMI 2
#define STATUS_INT_ENABLED 3

#define IWL_TRANS_GET_PCIE_TRANS(_iwl_trans) \
((struct iwl_trans_pcie *) ((_iwl_trans)->trans_specific))

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void iwl_rx_queue_update_write_ptr(struct iwl_trans *trans,
IWL_TRANS_GET_PCIE_TRANS(trans);

/* If power-saving is in use, make sure device is awake */
if (test_bit(STATUS_POWER_PMI, &trans_pcie->status)) {
if (test_bit(STATUS_TPOWER_PMI, &trans_pcie->status)) {
reg = iwl_read32(trans, CSR_UCODE_DRV_GP1);

if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void iwl_txq_update_write_ptr(struct iwl_trans *trans, struct iwl_tx_queue *txq)
struct iwl_trans_pcie *trans_pcie =
IWL_TRANS_GET_PCIE_TRANS(trans);
/* if we're trying to save power */
if (test_bit(STATUS_POWER_PMI, &trans_pcie->status)) {
if (test_bit(STATUS_TPOWER_PMI, &trans_pcie->status)) {
/* wake up nic if it's powered down ...
* uCode will wake up, and interrupt us again, so next
* time we'll skip this part. */
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)
clear_bit(STATUS_HCMD_ACTIVE, &trans_pcie->status);
clear_bit(STATUS_INT_ENABLED, &trans_pcie->status);
clear_bit(STATUS_DEVICE_ENABLED, &trans_pcie->status);
clear_bit(STATUS_POWER_PMI, &trans_pcie->status);
clear_bit(STATUS_TPOWER_PMI, &trans_pcie->status);
}

static void iwl_trans_pcie_wowlan_suspend(struct iwl_trans *trans)
Expand Down Expand Up @@ -1574,9 +1574,9 @@ static void iwl_trans_pcie_set_pmi(struct iwl_trans *trans, bool state)
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);

if (state)
set_bit(STATUS_POWER_PMI, &trans_pcie->status);
set_bit(STATUS_TPOWER_PMI, &trans_pcie->status);
else
clear_bit(STATUS_POWER_PMI, &trans_pcie->status);
clear_bit(STATUS_TPOWER_PMI, &trans_pcie->status);
}

#ifdef CONFIG_PM_SLEEP
Expand Down

0 comments on commit 13ad43d

Please sign in to comment.