aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl818x
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-07-29 21:50:29 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-16 14:39:47 -0400
commit0f956e7107fe5069767323a1bf2a522f5f37cc2c (patch)
tree6f5e81ee4314bd4a8039c0a564ac80e284b2428c /drivers/net/wireless/rtl818x
parent030725d2c7c1fafec7ede618647bf30ed79601f0 (diff)
rtl8180: use RTL818X_MSR_ADHOC for IBSS connection
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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)