aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl818x
diff options
context:
space:
mode:
authorHerton Ronaldo Krzesinski <herton@mandriva.com.br>2009-08-20 20:16:17 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-21 12:44:07 -0400
commit1a9937b7f07ab6e35515e32a7625f0ba50ab7670 (patch)
treeed9362e860eaf6ca3b1485f4c81fdadfa102536b /drivers/net/wireless/rtl818x
parent08fdef99342955a62884fb5c49ab43431a1cafbf (diff)
rtl8187: always set MSR_LINK_ENEDCA flag with RTL8187B
RTL8187B always needs MSR_LINK_ENEDCA flag to be set even when it is in no link mode, otherwise it'll not be able to associate when this flag is not set after the change "mac80211: fix managed mode BSSID handling". By accident, setting BSSID of AP before association makes 8187B to successfuly associate even when ENEDCA flag isn't set, which was the case before the mac80211 change. But now the BSSID of AP we are trying to associate is only available after association is successful, and any attempt to associate without the needed flag doesn't work. Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtl818x')
-rw-r--r--drivers/net/wireless/rtl818x/rtl8187_dev.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c
index 294250e294dd..87a95588a8e3 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c
@@ -869,6 +869,9 @@ static int rtl8187b_init_hw(struct ieee80211_hw *dev)
869 priv->aifsn[3] = 3; /* AIFSN[AC_BE] */ 869 priv->aifsn[3] = 3; /* AIFSN[AC_BE] */
870 rtl818x_iowrite8(priv, &priv->map->ACM_CONTROL, 0); 870 rtl818x_iowrite8(priv, &priv->map->ACM_CONTROL, 0);
871 871
872 /* ENEDCA flag must always be set, transmit issues? */
873 rtl818x_iowrite8(priv, &priv->map->MSR, RTL818X_MSR_ENEDCA);
874
872 return 0; 875 return 0;
873} 876}
874 877
@@ -1173,13 +1176,16 @@ static void rtl8187_bss_info_changed(struct ieee80211_hw *dev,
1173 rtl818x_iowrite8(priv, &priv->map->BSSID[i], 1176 rtl818x_iowrite8(priv, &priv->map->BSSID[i],
1174 info->bssid[i]); 1177 info->bssid[i]);
1175 1178
1179 if (priv->is_rtl8187b)
1180 reg = RTL818X_MSR_ENEDCA;
1181 else
1182 reg = 0;
1183
1176 if (is_valid_ether_addr(info->bssid)) { 1184 if (is_valid_ether_addr(info->bssid)) {
1177 reg = RTL818X_MSR_INFRA; 1185 reg |= RTL818X_MSR_INFRA;
1178 if (priv->is_rtl8187b)
1179 reg |= RTL818X_MSR_ENEDCA;
1180 rtl818x_iowrite8(priv, &priv->map->MSR, reg); 1186 rtl818x_iowrite8(priv, &priv->map->MSR, reg);
1181 } else { 1187 } else {
1182 reg = RTL818X_MSR_NO_LINK; 1188 reg |= RTL818X_MSR_NO_LINK;
1183 rtl818x_iowrite8(priv, &priv->map->MSR, reg); 1189 rtl818x_iowrite8(priv, &priv->map->MSR, reg);
1184 } 1190 }
1185 1191