From 33511b157bbcebaef853cc1811992b664a2e5862 Mon Sep 17 00:00:00 2001 From: Taehee Yoo Date: Wed, 21 Jan 2015 16:58:19 +0900 Subject: [PATCH] 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. Signed-off-by: Taehee Yoo Acked-by: Larry Finger Signed-off-by: Kalle Valo --- drivers/net/wireless/rtlwifi/core.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c index eb203163ed05..a31a12775f1a 100644 --- a/drivers/net/wireless/rtlwifi/core.c +++ b/drivers/net/wireless/rtlwifi/core.c @@ -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 && -- 2.20.1