diff mbox

rtlwifi: add support to send beacon frame.

Message ID 1421827099-17975-1-git-send-email-ap420073@gmail.com (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show

Commit Message

Taehee Yoo Jan. 21, 2015, 7:58 a.m. UTC
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>
---
 drivers/net/wireless/rtlwifi/core.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Larry Finger Jan. 22, 2015, 7:27 p.m. UTC | #1
On 01/21/2015 01:58 AM, Taehee Yoo wrote:
> 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>
> ---
>   drivers/net/wireless/rtlwifi/core.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

Thanks,

Larry

>
> diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
> index eb20316..a31a127 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 &&
>

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kalle Valo Jan. 27, 2015, 5:52 p.m. UTC | #2
> 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>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
index eb20316..a31a127 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 &&