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>
This commit is contained in:
Herton Ronaldo Krzesinski 2009-08-20 21:16:17 -03:00 committed by John W. Linville
parent 08fdef9934
commit 1a9937b7f0
1 changed files with 10 additions and 4 deletions

View File

@ -869,6 +869,9 @@ static int rtl8187b_init_hw(struct ieee80211_hw *dev)
priv->aifsn[3] = 3; /* AIFSN[AC_BE] */
rtl818x_iowrite8(priv, &priv->map->ACM_CONTROL, 0);
/* ENEDCA flag must always be set, transmit issues? */
rtl818x_iowrite8(priv, &priv->map->MSR, RTL818X_MSR_ENEDCA);
return 0;
}
@ -1173,13 +1176,16 @@ static void rtl8187_bss_info_changed(struct ieee80211_hw *dev,
rtl818x_iowrite8(priv, &priv->map->BSSID[i],
info->bssid[i]);
if (priv->is_rtl8187b)
reg = RTL818X_MSR_ENEDCA;
else
reg = 0;
if (is_valid_ether_addr(info->bssid)) {
reg = RTL818X_MSR_INFRA;
if (priv->is_rtl8187b)
reg |= RTL818X_MSR_ENEDCA;
reg |= RTL818X_MSR_INFRA;
rtl818x_iowrite8(priv, &priv->map->MSR, reg);
} else {
reg = RTL818X_MSR_NO_LINK;
reg |= RTL818X_MSR_NO_LINK;
rtl818x_iowrite8(priv, &priv->map->MSR, reg);
}