Commit 1a9937b7 authored by Herton Ronaldo Krzesinski's avatar Herton Ronaldo Krzesinski Committed by John W. Linville

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: default avatarHerton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Acked-by: default avatarHin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 08fdef99
...@@ -869,6 +869,9 @@ static int rtl8187b_init_hw(struct ieee80211_hw *dev) ...@@ -869,6 +869,9 @@ static int rtl8187b_init_hw(struct ieee80211_hw *dev)
priv->aifsn[3] = 3; /* AIFSN[AC_BE] */ priv->aifsn[3] = 3; /* AIFSN[AC_BE] */
rtl818x_iowrite8(priv, &priv->map->ACM_CONTROL, 0); 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; return 0;
} }
...@@ -1173,13 +1176,16 @@ static void rtl8187_bss_info_changed(struct ieee80211_hw *dev, ...@@ -1173,13 +1176,16 @@ static void rtl8187_bss_info_changed(struct ieee80211_hw *dev,
rtl818x_iowrite8(priv, &priv->map->BSSID[i], rtl818x_iowrite8(priv, &priv->map->BSSID[i],
info->bssid[i]); info->bssid[i]);
if (priv->is_rtl8187b)
reg = RTL818X_MSR_ENEDCA;
else
reg = 0;
if (is_valid_ether_addr(info->bssid)) { if (is_valid_ether_addr(info->bssid)) {
reg = RTL818X_MSR_INFRA; reg |= RTL818X_MSR_INFRA;
if (priv->is_rtl8187b)
reg |= RTL818X_MSR_ENEDCA;
rtl818x_iowrite8(priv, &priv->map->MSR, reg); rtl818x_iowrite8(priv, &priv->map->MSR, reg);
} else { } else {
reg = RTL818X_MSR_NO_LINK; reg |= RTL818X_MSR_NO_LINK;
rtl818x_iowrite8(priv, &priv->map->MSR, reg); rtl818x_iowrite8(priv, &priv->map->MSR, reg);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment