On 09/09/2013 12:29 PM, Mark Cave-Ayland wrote:
Please find the attached dmesg output from my current environment which is
Linus' git commit 6a7492a4b2e05051a44458d7187023e22d580666 along with your
beacon patch.
Does that help provide any further insight? To my untrained eye, it really looks
as if I'm not getting beacons every 6s as suggested by the comments in base.c.
(Feel free to CC any replies back to the list if you're happy no secrets are
being revealed)
There were no secrets in that dump, but it did reveal a major clue.
A response from your system for your AP was:
mode 2, state 0, is_beacon 0, is_probe_resp 1, length 147
For the number of beacons to be updated, the state has to be 2 or 3. My system
has scan_ssid=1 in the wpa_supplicant configuration file. When the scan
finishes, then a value of 2 is set into the mode variable.
The attached updated patch should set the correct mode even if scanning is not
enabled.
Larry
Index: wireless-testing-save/drivers/net/wireless/rtlwifi/base.c
===================================================================
--- wireless-testing-save.orig/drivers/net/wireless/rtlwifi/base.c
+++ wireless-testing-save/drivers/net/wireless/rtlwifi/base.c
@@ -1287,7 +1287,13 @@ void rtl_beacon_statistic(struct ieee802
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
+ static int count;
+ if (count++ < 100) {
+ pr_info("mode %d, state %d, is_beacon %d, is_probe_resp %d, length %d, MAC %pM\n",
+ rtlpriv->mac80211.opmode, rtlpriv->mac80211.link_state, ieee80211_is_beacon(hdr->frame_control),
+ ieee80211_is_probe_resp(hdr->frame_control), skb->len, hdr->addr3);
+ }
if (rtlpriv->mac80211.opmode != NL80211_IFTYPE_STATION)
return;
Index: wireless-testing-save/drivers/net/wireless/rtlwifi/usb.c
===================================================================
--- wireless-testing-save.orig/drivers/net/wireless/rtlwifi/usb.c
+++ wireless-testing-save/drivers/net/wireless/rtlwifi/usb.c
@@ -484,6 +484,8 @@ static void _rtl_usb_rx_process_agg(stru
if (unicast)
rtlpriv->link_info.num_rx_inperiod++;
}
+ /* static bcn for roaming */
+ rtl_beacon_statistic(hw, skb);
}
}
Index: wireless-testing-save/drivers/net/wireless/rtlwifi/core.c
===================================================================
--- wireless-testing-save.orig/drivers/net/wireless/rtlwifi/core.c
+++ wireless-testing-save/drivers/net/wireless/rtlwifi/core.c
@@ -184,6 +184,7 @@ static int rtl_op_add_interface(struct i
rtlpriv->cfg->maps
[RTL_IBSS_INT_MASKS]);
}
+ mac->link_state = MAC80211_LINKED;
break;
case NL80211_IFTYPE_ADHOC:
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,