Commit 0cfc6185 authored by Mike McCormack's avatar Mike McCormack Committed by Greg Kroah-Hartman

staging: rtl8192e: Don't disable interrupts in mgmt_tx_lock

Signed-off-by: default avatarMike McCormack <mikem@ring3k.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4573d145
...@@ -249,7 +249,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee ...@@ -249,7 +249,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee
spin_unlock_irqrestore(&ieee->lock, flags); spin_unlock_irqrestore(&ieee->lock, flags);
}else{ }else{
spin_unlock_irqrestore(&ieee->lock, flags); spin_unlock_irqrestore(&ieee->lock, flags);
spin_lock_irqsave(&ieee->mgmt_tx_lock, flags); spin_lock(&ieee->mgmt_tx_lock);
header->seq_ctl = cpu_to_le16(ieee->seq_ctrl[0] << 4); header->seq_ctl = cpu_to_le16(ieee->seq_ctrl[0] << 4);
...@@ -270,7 +270,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee ...@@ -270,7 +270,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee
} else { } else {
ieee->softmac_hard_start_xmit(skb,ieee->dev); ieee->softmac_hard_start_xmit(skb,ieee->dev);
} }
spin_unlock_irqrestore(&ieee->mgmt_tx_lock, flags); spin_unlock(&ieee->mgmt_tx_lock);
} }
} }
...@@ -1830,8 +1830,7 @@ inline void ieee80211_sta_ps(struct ieee80211_device *ieee) ...@@ -1830,8 +1830,7 @@ inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
u32 th,tl; u32 th,tl;
short sleep; short sleep;
unsigned long flags;
unsigned long flags,flags2;
spin_lock_irqsave(&ieee->lock, flags); spin_lock_irqsave(&ieee->lock, flags);
...@@ -1842,11 +1841,11 @@ inline void ieee80211_sta_ps(struct ieee80211_device *ieee) ...@@ -1842,11 +1841,11 @@ inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
// #warning CHECK_LOCK_HERE // #warning CHECK_LOCK_HERE
printk("=====>%s(): no need to ps,wake up!! ieee->ps is %d,ieee->iw_mode is %d,ieee->state is %d\n", printk("=====>%s(): no need to ps,wake up!! ieee->ps is %d,ieee->iw_mode is %d,ieee->state is %d\n",
__FUNCTION__,ieee->ps,ieee->iw_mode,ieee->state); __FUNCTION__,ieee->ps,ieee->iw_mode,ieee->state);
spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2); spin_lock(&ieee->mgmt_tx_lock);
ieee80211_sta_wakeup(ieee, 1); ieee80211_sta_wakeup(ieee, 1);
spin_unlock_irqrestore(&ieee->mgmt_tx_lock, flags2); spin_unlock(&ieee->mgmt_tx_lock);
} }
sleep = ieee80211_sta_ps_sleep(ieee,&th, &tl); sleep = ieee80211_sta_ps_sleep(ieee,&th, &tl);
...@@ -1861,7 +1860,7 @@ inline void ieee80211_sta_ps(struct ieee80211_device *ieee) ...@@ -1861,7 +1860,7 @@ inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
} }
else if(ieee->sta_sleep == 0){ else if(ieee->sta_sleep == 0){
spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2); spin_lock(&ieee->mgmt_tx_lock);
if(ieee->ps_is_queue_empty(ieee->dev)){ if(ieee->ps_is_queue_empty(ieee->dev)){
ieee->sta_sleep = 2; ieee->sta_sleep = 2;
...@@ -1870,18 +1869,18 @@ inline void ieee80211_sta_ps(struct ieee80211_device *ieee) ...@@ -1870,18 +1869,18 @@ inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
ieee->ps_th = th; ieee->ps_th = th;
ieee->ps_tl = tl; ieee->ps_tl = tl;
} }
spin_unlock_irqrestore(&ieee->mgmt_tx_lock, flags2); spin_unlock(&ieee->mgmt_tx_lock);
} }
ieee->bAwakePktSent = false;//after null to power save we set it to false. not listen every beacon. ieee->bAwakePktSent = false;//after null to power save we set it to false. not listen every beacon.
}else if(sleep == 2){ }else if(sleep == 2){
spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2); spin_lock(&ieee->mgmt_tx_lock);
ieee80211_sta_wakeup(ieee,1); ieee80211_sta_wakeup(ieee,1);
spin_unlock_irqrestore(&ieee->mgmt_tx_lock, flags2); spin_unlock(&ieee->mgmt_tx_lock);
} }
out: out:
...@@ -1933,7 +1932,7 @@ void ieee80211_sta_wakeup(struct ieee80211_device *ieee, short nl) ...@@ -1933,7 +1932,7 @@ void ieee80211_sta_wakeup(struct ieee80211_device *ieee, short nl)
void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success) void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success)
{ {
unsigned long flags,flags2; unsigned long flags;
spin_lock_irqsave(&ieee->lock, flags); spin_lock_irqsave(&ieee->lock, flags);
...@@ -1946,7 +1945,7 @@ void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success) ...@@ -1946,7 +1945,7 @@ void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success)
} else {/* 21112005 - tx again null without PS bit if lost */ } else {/* 21112005 - tx again null without PS bit if lost */
if((ieee->sta_sleep == 0) && !success){ if((ieee->sta_sleep == 0) && !success){
spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2); spin_lock(&ieee->mgmt_tx_lock);
//ieee80211_sta_ps_send_null_frame(ieee, 0); //ieee80211_sta_ps_send_null_frame(ieee, 0);
if(ieee->pHTInfo->IOTAction & HT_IOT_ACT_NULL_DATA_POWER_SAVING) if(ieee->pHTInfo->IOTAction & HT_IOT_ACT_NULL_DATA_POWER_SAVING)
{ {
...@@ -1956,7 +1955,7 @@ void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success) ...@@ -1956,7 +1955,7 @@ void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success)
{ {
ieee80211_sta_ps_send_pspoll_frame(ieee); ieee80211_sta_ps_send_pspoll_frame(ieee);
} }
spin_unlock_irqrestore(&ieee->mgmt_tx_lock, flags2); spin_unlock(&ieee->mgmt_tx_lock);
} }
} }
spin_unlock_irqrestore(&ieee->lock, flags); spin_unlock_irqrestore(&ieee->lock, flags);
......
...@@ -3234,16 +3234,14 @@ bool MgntActSet_802_11_PowerSaveMode(struct net_device *dev, u8 rtPsMode) ...@@ -3234,16 +3234,14 @@ bool MgntActSet_802_11_PowerSaveMode(struct net_device *dev, u8 rtPsMode)
// Awake immediately // Awake immediately
if(priv->ieee80211->sta_sleep != 0 && rtPsMode == IEEE80211_PS_DISABLED) if(priv->ieee80211->sta_sleep != 0 && rtPsMode == IEEE80211_PS_DISABLED)
{ {
unsigned long flags;
// Notify the AP we awke. // Notify the AP we awke.
rtl8192_hw_wakeup(dev); rtl8192_hw_wakeup(dev);
priv->ieee80211->sta_sleep = 0; priv->ieee80211->sta_sleep = 0;
spin_lock_irqsave(&(priv->ieee80211->mgmt_tx_lock), flags); spin_lock(&priv->ieee80211->mgmt_tx_lock);
printk("LPS leave: notify AP we are awaked ++++++++++ SendNullFunctionData\n"); printk("LPS leave: notify AP we are awaked ++++++++++ SendNullFunctionData\n");
ieee80211_sta_ps_send_null_frame(priv->ieee80211, 0); ieee80211_sta_ps_send_null_frame(priv->ieee80211, 0);
spin_unlock_irqrestore(&(priv->ieee80211->mgmt_tx_lock), flags); spin_unlock(&priv->ieee80211->mgmt_tx_lock);
} }
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment