mirror of
https://github.com/hardkernel/linux.git
synced 2026-05-31 16:26:41 +09:00
rtl8192{ce,cu,de,se}: avoid problems because of possible ERFOFF -> ERFSLEEP transition
commit 91ddff8a3b upstream.
In drivers rtl8192ce, rtl8192cu, rtl8192se, and rtl8192de, break
statements would allow ppsc->rfpwr_state to be changed to ERFSLEEP
even though the device is actually in ERFOFF.
Signed-off-by: Philipp Dreimann <philipp@dreimann.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
105bad88a8
commit
4244546343
@@ -569,7 +569,7 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
|
||||
}
|
||||
case ERFSLEEP:{
|
||||
if (ppsc->rfpwr_state == ERFOFF)
|
||||
break;
|
||||
return false;
|
||||
for (queue_id = 0, i = 0;
|
||||
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
|
||||
ring = &pcipriv->dev.tx_ring[queue_id];
|
||||
|
||||
@@ -548,7 +548,7 @@ static bool _rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw,
|
||||
break;
|
||||
case ERFSLEEP:
|
||||
if (ppsc->rfpwr_state == ERFOFF)
|
||||
break;
|
||||
return false;
|
||||
for (queue_id = 0, i = 0;
|
||||
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
|
||||
ring = &pcipriv->dev.tx_ring[queue_id];
|
||||
|
||||
@@ -3374,7 +3374,7 @@ bool rtl92d_phy_set_rf_power_state(struct ieee80211_hw *hw,
|
||||
break;
|
||||
case ERFSLEEP:
|
||||
if (ppsc->rfpwr_state == ERFOFF)
|
||||
break;
|
||||
return false;
|
||||
|
||||
for (queue_id = 0, i = 0;
|
||||
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
|
||||
|
||||
@@ -602,7 +602,7 @@ bool rtl92s_phy_set_rf_power_state(struct ieee80211_hw *hw,
|
||||
}
|
||||
case ERFSLEEP:
|
||||
if (ppsc->rfpwr_state == ERFOFF)
|
||||
break;
|
||||
return false;
|
||||
|
||||
for (queue_id = 0, i = 0;
|
||||
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
|
||||
|
||||
Reference in New Issue
Block a user