diff options
-rw-r--r-- | drivers/net/wireless/rtlwifi/core.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/trx.c | 5 |
3 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c index 059ab036b01d..e4f4aee8f298 100644 --- a/drivers/net/wireless/rtlwifi/core.c +++ b/drivers/net/wireless/rtlwifi/core.c | |||
@@ -551,6 +551,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, | |||
551 | RT_TRACE(rtlpriv, COMP_MAC80211, DBG_TRACE, | 551 | RT_TRACE(rtlpriv, COMP_MAC80211, DBG_TRACE, |
552 | ("BSS_CHANGED_HT\n")); | 552 | ("BSS_CHANGED_HT\n")); |
553 | 553 | ||
554 | rcu_read_lock(); | ||
554 | sta = ieee80211_find_sta(mac->vif, mac->bssid); | 555 | sta = ieee80211_find_sta(mac->vif, mac->bssid); |
555 | 556 | ||
556 | if (sta) { | 557 | if (sta) { |
@@ -563,6 +564,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, | |||
563 | mac->current_ampdu_factor = | 564 | mac->current_ampdu_factor = |
564 | sta->ht_cap.ampdu_factor; | 565 | sta->ht_cap.ampdu_factor; |
565 | } | 566 | } |
567 | rcu_read_unlock(); | ||
566 | 568 | ||
567 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SHORTGI_DENSITY, | 569 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SHORTGI_DENSITY, |
568 | (u8 *) (&mac->max_mss_density)); | 570 | (u8 *) (&mac->max_mss_density)); |
@@ -614,6 +616,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, | |||
614 | else | 616 | else |
615 | mac->mode = WIRELESS_MODE_G; | 617 | mac->mode = WIRELESS_MODE_G; |
616 | 618 | ||
619 | rcu_read_lock(); | ||
617 | sta = ieee80211_find_sta(mac->vif, mac->bssid); | 620 | sta = ieee80211_find_sta(mac->vif, mac->bssid); |
618 | 621 | ||
619 | if (sta) { | 622 | if (sta) { |
@@ -648,6 +651,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, | |||
648 | */ | 651 | */ |
649 | } | 652 | } |
650 | } | 653 | } |
654 | rcu_read_unlock(); | ||
651 | 655 | ||
652 | /*mac80211 just give us CCK rates any time | 656 | /*mac80211 just give us CCK rates any time |
653 | *So we add G rate in basic rates when | 657 | *So we add G rate in basic rates when |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c index 8a67372f71fb..e14f74367396 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | |||
@@ -730,7 +730,7 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, | |||
730 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); | 730 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); |
731 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); | 731 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); |
732 | bool defaultadapter = true; | 732 | bool defaultadapter = true; |
733 | struct ieee80211_sta *sta = ieee80211_find_sta(mac->vif, mac->bssid); | 733 | struct ieee80211_sta *sta; |
734 | u8 *pdesc = (u8 *) pdesc_tx; | 734 | u8 *pdesc = (u8 *) pdesc_tx; |
735 | struct rtl_tcb_desc tcb_desc; | 735 | struct rtl_tcb_desc tcb_desc; |
736 | u8 *qc = ieee80211_get_qos_ctl(hdr); | 736 | u8 *qc = ieee80211_get_qos_ctl(hdr); |
@@ -810,10 +810,13 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, | |||
810 | SET_TX_DESC_LINIP(pdesc, 0); | 810 | SET_TX_DESC_LINIP(pdesc, 0); |
811 | SET_TX_DESC_PKT_SIZE(pdesc, (u16) skb->len); | 811 | SET_TX_DESC_PKT_SIZE(pdesc, (u16) skb->len); |
812 | 812 | ||
813 | rcu_read_lock(); | ||
814 | sta = ieee80211_find_sta(mac->vif, mac->bssid); | ||
813 | if (sta) { | 815 | if (sta) { |
814 | u8 ampdu_density = sta->ht_cap.ampdu_density; | 816 | u8 ampdu_density = sta->ht_cap.ampdu_density; |
815 | SET_TX_DESC_AMPDU_DENSITY(pdesc, ampdu_density); | 817 | SET_TX_DESC_AMPDU_DENSITY(pdesc, ampdu_density); |
816 | } | 818 | } |
819 | rcu_read_unlock(); | ||
817 | 820 | ||
818 | if (info->control.hw_key) { | 821 | if (info->control.hw_key) { |
819 | struct ieee80211_key_conf *keyconf = | 822 | struct ieee80211_key_conf *keyconf = |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c index 659e0ca95c64..d0b0d43b9a6d 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c | |||
@@ -504,7 +504,7 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, | |||
504 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); | 504 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); |
505 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); | 505 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); |
506 | bool defaultadapter = true; | 506 | bool defaultadapter = true; |
507 | struct ieee80211_sta *sta = ieee80211_find_sta(mac->vif, mac->bssid); | 507 | struct ieee80211_sta *sta; |
508 | struct rtl_tcb_desc tcb_desc; | 508 | struct rtl_tcb_desc tcb_desc; |
509 | u8 *qc = ieee80211_get_qos_ctl(hdr); | 509 | u8 *qc = ieee80211_get_qos_ctl(hdr); |
510 | u8 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK; | 510 | u8 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK; |
@@ -562,10 +562,13 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, | |||
562 | SET_TX_DESC_DATA_BW(txdesc, 0); | 562 | SET_TX_DESC_DATA_BW(txdesc, 0); |
563 | SET_TX_DESC_DATA_SC(txdesc, 0); | 563 | SET_TX_DESC_DATA_SC(txdesc, 0); |
564 | } | 564 | } |
565 | rcu_read_lock(); | ||
566 | sta = ieee80211_find_sta(mac->vif, mac->bssid); | ||
565 | if (sta) { | 567 | if (sta) { |
566 | u8 ampdu_density = sta->ht_cap.ampdu_density; | 568 | u8 ampdu_density = sta->ht_cap.ampdu_density; |
567 | SET_TX_DESC_AMPDU_DENSITY(txdesc, ampdu_density); | 569 | SET_TX_DESC_AMPDU_DENSITY(txdesc, ampdu_density); |
568 | } | 570 | } |
571 | rcu_read_unlock(); | ||
569 | if (info->control.hw_key) { | 572 | if (info->control.hw_key) { |
570 | struct ieee80211_key_conf *keyconf = info->control.hw_key; | 573 | struct ieee80211_key_conf *keyconf = info->control.hw_key; |
571 | switch (keyconf->cipher) { | 574 | switch (keyconf->cipher) { |