rt2x00: Fix interface opening/closing on suspend/resume
PATCH 14/24 rt2x00: Fix interface opening/closing on suspend/resume
Quoted 1 line
From
c2a2fd3eaa85367e56b01955139678fe772d1cfdMon Sep 17 00:00:00 2001
From: Ivo van Doorn <[email protected]>
Date: Sat, 28 Jul 2007 16:32:36 +0200
Subject: [PATCH 14/24] rt2x00: Fix interface opening/closing on suspend/resume
During suspend rt2x00lib must close/unitialize all items that _must_ be reinitialized on resume. This means that rt2x00lib_uninitialize() must be called because the firmware and registers must be initialized on resume.
Also make sure the beacon transmission will get a new impulse, and just to be safe close and reopen the debugfs entries.
Signed-off-by Ivo van Doorn <[email protected]>
--- drivers/net/wireless/rt2400pci.c | 2 +- drivers/net/wireless/rt2500pci.c | 2 +- drivers/net/wireless/rt2x00dev.c | 53 +++++++++++++++++++++++++++++++++++++- drivers/net/wireless/rt2x00lib.h | 1 + drivers/net/wireless/rt2x00pci.c | 18 ------------- drivers/net/wireless/rt2x00pci.h | 1 - drivers/net/wireless/rt61pci.c | 2 +- 7 files changed, 56 insertions(+), 23 deletions(-)
drivers/net/wireless/rt2400pci.c +1 -1
@@ -1277,7 +1277,7 @@ static irqreturn_t rt2400pci_interrupt(int irq, void *dev_instance)* 1 - Beacon timer expired interrupt. */ if (rt2x00_get_field32 (reg,CSR7_TBCN_EXPIRE )) -rt2x00pci_beacondone (rt2x00dev,IEEE80211_TX_QUEUE_BEACON ); +rt2x00lib_beacondone (rt2x00dev,IEEE80211_TX_QUEUE_BEACON );/* * 2 - Rx ring done interrupt.
drivers/net/wireless/rt2500pci.c +1 -1
@@ -1446,7 +1446,7 @@ static irqreturn_t rt2500pci_interrupt(int irq, void *dev_instance)* 1 - Beacon timer expired interrupt. */ if (rt2x00_get_field32 (reg,CSR7_TBCN_EXPIRE )) -rt2x00pci_beacondone (rt2x00dev,IEEE80211_TX_QUEUE_BEACON ); +rt2x00lib_beacondone (rt2x00dev,IEEE80211_TX_QUEUE_BEACON );/* * 2 - Rx ring done interrupt.
drivers/net/wireless/rt2x00dev.c +52 -1
80 lines not on this page · raw message
drivers/net/wireless/rt2x00lib.h +1 -0
@@ -75,6 +75,7 @@ int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev);/* * Interrupt context handlers. */ +void rt2x00lib_beacondone (struct rt2x00_dev *rt2x00dev,const int queue);void rt2x00lib_txdone (struct data_entry *entry,const int status,const int retry); void rt2x00lib_rxdone(struct data_entry *entry, char *data,
drivers/net/wireless/rt2x00pci.c +0 -18
@@ -72,24 +72,6 @@ int rt2x00pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, }EXPORT_SYMBOL_GPL (rt2x00pci_beacon_update); -void rt2x00pci_beacondone (struct rt2x00_dev *rt2x00dev,const int queue) -{ -struct data_ring *ring =rt2x00_get_ring (rt2x00dev, queue); -struct data_entry *entry =rt2x00_get_data_entry (ring); -struct sk_buff *skb; - - skb =ieee80211_beacon_get (rt2x00dev->hw, - rt2x00dev->interface.id, &entry->tx_status.control); -if (!skb) -return ; - - rt2x00dev->ops->hw->beacon_update (rt2x00dev->hw, skb, - &entry->tx_status.control); - -dev_kfree_skb (skb); -} -EXPORT_SYMBOL_GPL (rt2x00pci_beacondone); -/* * TX data handlers. */
drivers/net/wireless/rt2x00pci.h +0 -1
@@ -85,7 +85,6 @@ static inline void rt2x00pci_register_multiwrite(*/ int rt2x00pci_beacon_update (struct ieee80211_hw *hw,struct sk_buff *skb,struct ieee80211_tx_control *control); -void rt2x00pci_beacondone (struct rt2x00_dev *rt2x00dev,const int queue);/* * TX data handlers.
drivers/net/wireless/rt61pci.c +1 -1
@@ -1885,7 +1885,7 @@ static irqreturn_t rt61pci_interrupt(int irq, void *dev_instance)* 1 - Beacon timer expired interrupt. */ if (rt2x00_get_field32 (reg,INT_SOURCE_CSR_BEACON_DONE )) -rt2x00pci_beacondone (rt2x00dev,IEEE80211_TX_QUEUE_BEACON ); +rt2x00lib_beacondone (rt2x00dev,IEEE80211_TX_QUEUE_BEACON );/* * 2 - Rx ring done interrupt.
Signature · 1 line
1.5.2.4