aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl818x
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rtl818x')
-rw-r--r--drivers/net/wireless/rtl818x/rtl8180_dev.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180_dev.c
index 02d0f71d0faa..9544eb1a23dc 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c
@@ -790,6 +790,7 @@ static void rtl8180_bss_info_changed(struct ieee80211_hw *dev,
790 struct rtl8180_priv *priv = dev->priv; 790 struct rtl8180_priv *priv = dev->priv;
791 struct rtl8180_vif *vif_priv; 791 struct rtl8180_vif *vif_priv;
792 int i; 792 int i;
793 u8 reg;
793 794
794 vif_priv = (struct rtl8180_vif *)&vif->drv_priv; 795 vif_priv = (struct rtl8180_vif *)&vif->drv_priv;
795 796
@@ -798,12 +799,14 @@ static void rtl8180_bss_info_changed(struct ieee80211_hw *dev,
798 rtl818x_iowrite8(priv, &priv->map->BSSID[i], 799 rtl818x_iowrite8(priv, &priv->map->BSSID[i],
799 info->bssid[i]); 800 info->bssid[i]);
800 801
801 if (is_valid_ether_addr(info->bssid)) 802 if (is_valid_ether_addr(info->bssid)) {
802 rtl818x_iowrite8(priv, &priv->map->MSR, 803 if (vif->type == NL80211_IFTYPE_ADHOC)
803 RTL818X_MSR_INFRA); 804 reg = RTL818X_MSR_ADHOC;
804 else 805 else
805 rtl818x_iowrite8(priv, &priv->map->MSR, 806 reg = RTL818X_MSR_INFRA;
806 RTL818X_MSR_NO_LINK); 807 } else
808 reg = RTL818X_MSR_NO_LINK;
809 rtl818x_iowrite8(priv, &priv->map->MSR, reg);
807 } 810 }
808 811
809 if (changed & BSS_CHANGED_ERP_SLOT && priv->rf->conf_erp) 812 if (changed & BSS_CHANGED_ERP_SLOT && priv->rf->conf_erp)