From patchwork Thu Feb 19 18:19:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 5853451 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5D2389F269 for ; Thu, 19 Feb 2015 18:19:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4D33202B8 for ; Thu, 19 Feb 2015 18:19:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 942942012D for ; Thu, 19 Feb 2015 18:19:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752270AbbBSSTY (ORCPT ); Thu, 19 Feb 2015 13:19:24 -0500 Received: from mail-ob0-f174.google.com ([209.85.214.174]:37036 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751903AbbBSSTY (ORCPT ); Thu, 19 Feb 2015 13:19:24 -0500 Received: by mail-ob0-f174.google.com with SMTP id wo20so17392128obc.5 for ; Thu, 19 Feb 2015 10:19:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=X59pzP6fD9KsxAXc0bZbyCc5f6Ipx3LtqWsOaKsYSzA=; b=Axy12+z0bysXi2kqUk/J4KIjwKbD4xv95LUbZqlYKmM5oIeyWb7HF4oBKzuHf7+2jq 5We3XQeyueYX02O/KUmFlh2rsQvdYWQ0Qk+wCTsXQc9cKrpLHNPuWGxRkvZ3fvlXLDCX XCrJNxgBzytYxBOhpquuLl+D9zzhnvUtB2EYC1u+UGfywrcN6ftSCDLdxMFTx/RwrtYB tVG4diSrmc3ObDgb9ZiE01h2tUJ7P0ryLQIhtFcoBdKTLKRROItzmyfcwEnKoZvqvHAC sw8aQFot7vJ3TE4fDKB7creaSiDN/uqwRXk69O40OEQi8FW8MznVDUSIp4G/5lfUe22n ArnQ== X-Received: by 10.202.169.205 with SMTP id s196mr3578660oie.21.1424369963644; Thu, 19 Feb 2015 10:19:23 -0800 (PST) Received: from linux.site ([69.76.245.152]) by mx.google.com with ESMTPSA id a62sm15325720oih.12.2015.02.19.10.19.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Feb 2015 10:19:23 -0800 (PST) Message-ID: <54E6292A.3040106@lwfinger.net> Date: Thu, 19 Feb 2015 12:19:22 -0600 From: Larry Finger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Mike Turner CC: linux-wireless Subject: Re: rtl8192cu beacon fix unreliable References: <54E503B0.8020904@lwfinger.net> In-Reply-To: Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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,