]> git.karo-electronics.de Git - linux-beck.git/commitdiff
rtlwifi: add support to send beacon frame.
authorTaehee Yoo <ap420073@gmail.com>
Wed, 21 Jan 2015 07:58:19 +0000 (16:58 +0900)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 27 Jan 2015 17:51:49 +0000 (19:51 +0200)
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 <ap420073@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rtlwifi/core.c

index eb203163ed0553947438207f43578a33009a3082..a31a12775f1a0ff114c63e9ee17dfddc31eee273 100644 (file)
@@ -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 &&