Skip to content

Commit 91ddff8

Browse files
dphilinvjw
authored andcommitted
rtl8192{ce,cu,de,se}: avoid problems because of possible ERFOFF -> ERFSLEEP transition
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 <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Cc: Chaoming Li <[email protected]> Signed-off-by: John W. Linville <[email protected]>
1 parent 15062e6 commit 91ddff8

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

drivers/net/wireless/rtlwifi/rtl8192ce/phy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
569569
}
570570
case ERFSLEEP:{
571571
if (ppsc->rfpwr_state == ERFOFF)
572-
break;
572+
return false;
573573
for (queue_id = 0, i = 0;
574574
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
575575
ring = &pcipriv->dev.tx_ring[queue_id];

drivers/net/wireless/rtlwifi/rtl8192cu/phy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ static bool _rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw,
548548
break;
549549
case ERFSLEEP:
550550
if (ppsc->rfpwr_state == ERFOFF)
551-
break;
551+
return false;
552552
for (queue_id = 0, i = 0;
553553
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
554554
ring = &pcipriv->dev.tx_ring[queue_id];

drivers/net/wireless/rtlwifi/rtl8192de/phy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3374,7 +3374,7 @@ bool rtl92d_phy_set_rf_power_state(struct ieee80211_hw *hw,
33743374
break;
33753375
case ERFSLEEP:
33763376
if (ppsc->rfpwr_state == ERFOFF)
3377-
break;
3377+
return false;
33783378

33793379
for (queue_id = 0, i = 0;
33803380
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {

drivers/net/wireless/rtlwifi/rtl8192se/phy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ bool rtl92s_phy_set_rf_power_state(struct ieee80211_hw *hw,
602602
}
603603
case ERFSLEEP:
604604
if (ppsc->rfpwr_state == ERFOFF)
605-
break;
605+
return false;
606606

607607
for (queue_id = 0, i = 0;
608608
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {

0 commit comments

Comments
 (0)