diff mbox

rtl8192cu beacon fix unreliable

Message ID 54E6292A.3040106@lwfinger.net (mailing list archive)
State Not Applicable
Delegated to: Kalle Valo
Headers show

Commit Message

Larry Finger Feb. 19, 2015, 6:19 p.m. UTC
On 02/19/2015 11:37 AM, Mike Turner wrote:
> Sorry,
>
> I know personal replies aren't liked, however couldn't see how to send a reply
> to your reply to my original post. (if you can tell me how to do that then I
> will in future)
>
> Anyway, I had already checked the send_beacon_frame() call and it gets called
> whether or not the beacon starts.

If you use the web interface at Gmail, you can enable "reply all" in 
Settings=>Settings.

One other thing. Most mailing lists prefer bottom, not top, posting. That way 
you can read the thread in chronological order.

There must be some kind of race condition that sometimes makes the beacon start 
fail. Please try the attached patch to see if it helps.

Larry
diff mbox

Patch

Index: wireless-drivers/drivers/net/wireless/rtlwifi/core.c
===================================================================
--- wireless-drivers.orig/drivers/net/wireless/rtlwifi/core.c
+++ wireless-drivers/drivers/net/wireless/rtlwifi/core.c
@@ -1010,8 +1010,7 @@  static int rtl_op_conf_tx(struct ieee802
 	return 0;
 }
 
-static void send_beacon_frame(struct ieee80211_hw *hw,
-			      struct ieee80211_vif *vif)
+void rtl_send_beacon_frame(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct sk_buff *skb = ieee80211_beacon_get(hw, vif);
@@ -1019,6 +1018,7 @@  static void send_beacon_frame(struct iee
 	if (skb)
 		rtlpriv->intf_ops->adapter_tx(hw, NULL, skb, NULL);
 }
+EXPORT_SYMBOL(rtl_send_beacon_frame);
 
 static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
 				    struct ieee80211_vif *vif,
@@ -1050,7 +1050,7 @@  static void rtl_op_bss_info_changed(stru
 
 				if (rtlpriv->cfg->ops->linked_set_reg)
 					rtlpriv->cfg->ops->linked_set_reg(hw);
-				send_beacon_frame(hw, vif);
+				rtl_send_beacon_frame(hw, vif);
 			}
 		}
 		if ((changed & BSS_CHANGED_BEACON_ENABLED &&
Index: wireless-drivers/drivers/net/wireless/rtlwifi/core.h
===================================================================
--- wireless-drivers.orig/drivers/net/wireless/rtlwifi/core.h
+++ wireless-drivers/drivers/net/wireless/rtlwifi/core.h
@@ -85,5 +85,6 @@  void rtl_bb_delay(struct ieee80211_hw *h
 bool rtl_cmd_send_packet(struct ieee80211_hw *hw, struct sk_buff *skb);
 bool rtl_btc_status_false(void);
 void rtl_dm_diginit(struct ieee80211_hw *hw, u32 cur_igval);
+void rtl_send_beacon_frame(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
 
 #endif
Index: wireless-drivers/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
===================================================================
--- wireless-drivers.orig/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
+++ wireless-drivers/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
@@ -30,6 +30,7 @@ 
 #include "../wifi.h"
 #include "../efuse.h"
 #include "../base.h"
+#include "../core.h"
 #include "../cam.h"
 #include "../ps.h"
 #include "../usb.h"
@@ -1529,6 +1530,7 @@  void rtl92cu_set_beacon_interval(struct
 	RT_TRACE(rtlpriv, COMP_BEACON, DBG_DMESG, "beacon_interval:%d\n",
 		 bcn_interval);
 	rtl_write_word(rtlpriv, REG_BCN_INTERVAL, bcn_interval);
+	rtl_send_beacon_frame(hw, mac->vif);
 }
 
 void rtl92cu_update_interrupt_mask(struct ieee80211_hw *hw,