Skip to contentSkip to conversation

rtlwifi: add support to send beacon frame.

PATCH Applied Taehee Yoo 3 participants 3 messages Jan 21, 2015 – Jan 27, 2015 Networking drivers (wireless)

lore
Share & tools
lore

Taehee Yoo

author
#0 lore raw

PATCH 1/1 rtlwifi: add support to send beacon frame.

In AP mode, beacon frame is necessary to keep connection. this patch adds a sending beacon frame routine in initialization routine.

---
 drivers/net/wireless/rtlwifi/core.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/net/wireless/rtlwifi/core.c +11 -0
index eb20316..a31a127 100644
@@ -1010,6 +1010,16 @@ static int rtl_op_conf_tx(struct ieee80211_hw *hw,
 	return 0;
 }
 
+static void 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);
+
+	if (skb)
+		rtlpriv->intf_ops->adapter_tx(hw, NULL, skb, NULL);
+}
+
 static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
 				    struct ieee80211_vif *vif,
 				    struct ieee80211_bss_conf *bss_conf,
@@ -1040,6 +1050,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
 
 				if (rtlpriv->cfg->ops->linked_set_reg)
 					rtlpriv->cfg->ops->linked_set_reg(hw);
+				send_beacon_frame(hw, vif);
 			}
 		}
 		if ((changed & BSS_CHANGED_BEACON_ENABLED &&
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Taehee Yoo

In AP mode, beacon frame is necessary to keep connection. this patch adds a sending beacon frame routine in initialization routine.

---
  drivers/net/wireless/rtlwifi/core.c | 11 +++++++++++
  1 file changed, 11 insertions(+)

Thanks,

Larry

Quoted 31 lines
drivers/net/wireless/rtlwifi/core.c +11 -0
index eb20316..a31a127 100644
@@ -1010,6 +1010,16 @@ static int rtl_op_conf_tx(struct ieee80211_hw *hw,
  	return 0;
  }
 
+static void 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);
+
+	if (skb)
+		rtlpriv->intf_ops->adapter_tx(hw, NULL, skb, NULL);
+}
+
  static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
  				    struct ieee80211_vif *vif,
  				    struct ieee80211_bss_conf *bss_conf,
@@ -1040,6 +1050,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
 
  				if (rtlpriv->cfg->ops->linked_set_reg)
  					rtlpriv->cfg->ops->linked_set_reg(hw);
+				send_beacon_frame(hw, vif);
  			}
  		}
  		if ((changed & BSS_CHANGED_BEACON_ENABLED &&