From patchwork Tue Nov 29 03:01:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Barry Day X-Patchwork-Id: 9450871 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 68F47600CB for ; Tue, 29 Nov 2016 03:05:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5BFA7206AF for ; Tue, 29 Nov 2016 03:05:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DDF127F46; Tue, 29 Nov 2016 03:05:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C293E206AF for ; Tue, 29 Nov 2016 03:05:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755465AbcK2DFY (ORCPT ); Mon, 28 Nov 2016 22:05:24 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36091 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751765AbcK2DFX (ORCPT ); Mon, 28 Nov 2016 22:05:23 -0500 Received: by mail-pf0-f194.google.com with SMTP id c4so7373634pfb.3 for ; Mon, 28 Nov 2016 19:05:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=yX1E6gi3OOi/01gJkM4ooM84ZMGpWUluapsXCpkvbi8=; b=ps8csubq+9tmfYrLNBRDWz7cyhTDB9jfscTqq+2WkABrjYMLkBWzskB4ehDg6V+0Bf UgqIasTfBX8GV/SWvSsweHT/8uanf8S0BbvEZ0TknA7KSc6A0WzaSa7QGDAWHNllXtM5 mUsOKGD9MKxvkJe/GiQtZz68mc+5GUKMWrLMZIeMJiGmbXOM2VzUhZcGHoYfxYmi53Qu /NIbQflKxI30TFiVxT8rxoZ3eRSIvHzFu4zeMWCgJEO9qkD1asJPaOx5e40IZpRpjHJD xSDJIClfOIO/WnFwrnWiI+V6DZWMmyoM+6stmS12ftzYrTXJYwH3xD2cBTvHk7jSLJKl T9tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=yX1E6gi3OOi/01gJkM4ooM84ZMGpWUluapsXCpkvbi8=; b=O8T7mU6yw3Uj9Mv0xMKhBrcHoZ5qoZ/951PdZwxXtotxB2pbwGO4AZiYFp1JV7/kWw oQ+/hi3mj68qszATa83iP4ufhK16z9uABVwH3MuLdTVIWm639WKDxGKzJK0vM6ld6AYl 9AMYCEK6RNTCdYduaEcM443CDDqwi3BNRDmTa47tovtrDJNpMMXNZBQRkdE5++TBI9ir FwJADwO1oKGY0367Hh3vS+MnS+NElUiU0Q2Yi5SjtQ4X+fzf4K0kCHgNnA4P2v22NU9+ tU1QFDLIUjLLPTY+CQW+N8OPpGnKnKwx0qSgyn2cpBj5GeBAh17fshiRERU8L58rLxjH cTRQ== X-Gm-Message-State: AKaTC01qBXGRvGdDNc1xAE8NL+2gAr+WluiaaALEvfzCyQxA966PT8LxMh67DJ/upWZVWQ== X-Received: by 10.84.217.199 with SMTP id d7mr56873398plj.165.1480388722313; Mon, 28 Nov 2016 19:05:22 -0800 (PST) Received: from box64.home.org (182-239-181-56.ip.adam.com.au. [182.239.181.56]) by smtp.gmail.com with ESMTPSA id y73sm90283815pfa.68.2016.11.28.19.05.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Nov 2016 19:05:21 -0800 (PST) Date: Tue, 29 Nov 2016 13:01:46 +1000 From: Barry Day To: Jes Sorensen Cc: linux-wireless@vger.kernel.org, Kalle Valo Subject: [PATCH] rtl8xxxu: Fix fail to reconnect to AP Message-ID: <20161129030137.GA7917@box64.home.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Removed the report_connect functions as the h2c commands used are not required for a soft-mac driver and they prevent reconnecting to an AP for a couple of the chipsets. Signed-off-by: Barry Day --- rtl8xxxu.h | 6 ------ rtl8xxxu_8192c.c | 1 - rtl8xxxu_8192e.c | 1 - rtl8xxxu_8723a.c | 1 - rtl8xxxu_8723b.c | 1 - rtl8xxxu_core.c | 36 ------------------------------------ 6 files changed, 46 deletions(-) diff --git a/rtl8xxxu.h b/rtl8xxxu.h index df551b2..3b1f62d 100644 --- a/rtl8xxxu.h +++ b/rtl8xxxu.h @@ -1335,8 +1335,6 @@ struct rtl8xxxu_fileops { bool ht40); void (*update_rate_mask) (struct rtl8xxxu_priv *priv, u32 ramask, int sgi); - void (*report_connect) (struct rtl8xxxu_priv *priv, - u8 macid, bool connect); void (*fill_txdesc) (struct ieee80211_hw *hw, struct ieee80211_hdr *hdr, struct ieee80211_tx_info *tx_info, struct rtl8xxxu_txdesc32 *tx_desc, bool sgi, @@ -1422,10 +1420,6 @@ void rtl8xxxu_update_rate_mask(struct rtl8xxxu_priv *priv, u32 ramask, int sgi); void rtl8xxxu_gen2_update_rate_mask(struct rtl8xxxu_priv *priv, u32 ramask, int sgi); -void rtl8xxxu_gen1_report_connect(struct rtl8xxxu_priv *priv, - u8 macid, bool connect); -void rtl8xxxu_gen2_report_connect(struct rtl8xxxu_priv *priv, - u8 macid, bool connect); void rtl8xxxu_gen1_init_aggregation(struct rtl8xxxu_priv *priv); void rtl8xxxu_gen1_enable_rf(struct rtl8xxxu_priv *priv); void rtl8xxxu_gen1_disable_rf(struct rtl8xxxu_priv *priv); diff --git a/rtl8xxxu_8192c.c b/rtl8xxxu_8192c.c index f9e2050..d5c37e0 100644 --- a/rtl8xxxu_8192c.c +++ b/rtl8xxxu_8192c.c @@ -566,7 +566,6 @@ struct rtl8xxxu_fileops rtl8192cu_fops = { .usb_quirks = rtl8xxxu_gen1_usb_quirks, .set_tx_power = rtl8xxxu_gen1_set_tx_power, .update_rate_mask = rtl8xxxu_update_rate_mask, - .report_connect = rtl8xxxu_gen1_report_connect, .fill_txdesc = rtl8xxxu_fill_txdesc_v1, .writeN_block_size = 128, .rx_agg_buf_size = 16000, diff --git a/rtl8xxxu_8192e.c b/rtl8xxxu_8192e.c index a1178c5..401aac4 100644 --- a/rtl8xxxu_8192e.c +++ b/rtl8xxxu_8192e.c @@ -1648,7 +1648,6 @@ struct rtl8xxxu_fileops rtl8192eu_fops = { .usb_quirks = rtl8xxxu_gen2_usb_quirks, .set_tx_power = rtl8192e_set_tx_power, .update_rate_mask = rtl8xxxu_gen2_update_rate_mask, - .report_connect = rtl8xxxu_gen2_report_connect, .fill_txdesc = rtl8xxxu_fill_txdesc_v2, .writeN_block_size = 128, .tx_desc_size = sizeof(struct rtl8xxxu_txdesc40), diff --git a/rtl8xxxu_8723a.c b/rtl8xxxu_8723a.c index aef3730..9c13db5 100644 --- a/rtl8xxxu_8723a.c +++ b/rtl8xxxu_8723a.c @@ -383,7 +383,6 @@ struct rtl8xxxu_fileops rtl8723au_fops = { .usb_quirks = rtl8xxxu_gen1_usb_quirks, .set_tx_power = rtl8xxxu_gen1_set_tx_power, .update_rate_mask = rtl8xxxu_update_rate_mask, - .report_connect = rtl8xxxu_gen1_report_connect, .fill_txdesc = rtl8xxxu_fill_txdesc_v1, .writeN_block_size = 1024, .rx_agg_buf_size = 16000, diff --git a/rtl8xxxu_8723b.c b/rtl8xxxu_8723b.c index 02b8ddd..30dc66e 100644 --- a/rtl8xxxu_8723b.c +++ b/rtl8xxxu_8723b.c @@ -1665,7 +1665,6 @@ struct rtl8xxxu_fileops rtl8723bu_fops = { .usb_quirks = rtl8xxxu_gen2_usb_quirks, .set_tx_power = rtl8723b_set_tx_power, .update_rate_mask = rtl8xxxu_gen2_update_rate_mask, - .report_connect = rtl8xxxu_gen2_report_connect, .fill_txdesc = rtl8xxxu_fill_txdesc_v2, .writeN_block_size = 1024, .tx_desc_size = sizeof(struct rtl8xxxu_txdesc40), diff --git a/rtl8xxxu_core.c b/rtl8xxxu_core.c index a9137ab..03e88d2 100644 --- a/rtl8xxxu_core.c +++ b/rtl8xxxu_core.c @@ -4352,39 +4352,6 @@ void rtl8xxxu_gen2_update_rate_mask(struct rtl8xxxu_priv *priv, rtl8xxxu_gen2_h2c_cmd(priv, &h2c, sizeof(h2c.b_macid_cfg)); } -void rtl8xxxu_gen1_report_connect(struct rtl8xxxu_priv *priv, - u8 macid, bool connect) -{ - struct h2c_cmd h2c; - - memset(&h2c, 0, sizeof(struct h2c_cmd)); - - h2c.joinbss.cmd = H2C_JOIN_BSS_REPORT; - - if (connect) - h2c.joinbss.data = H2C_JOIN_BSS_CONNECT; - else - h2c.joinbss.data = H2C_JOIN_BSS_DISCONNECT; - - rtl8xxxu_gen1_h2c_cmd(priv, &h2c, sizeof(h2c.joinbss)); -} - -void rtl8xxxu_gen2_report_connect(struct rtl8xxxu_priv *priv, - u8 macid, bool connect) -{ - struct h2c_cmd h2c; - - memset(&h2c, 0, sizeof(struct h2c_cmd)); - - h2c.media_status_rpt.cmd = H2C_8723B_MEDIA_STATUS_RPT; - if (connect) - h2c.media_status_rpt.parm |= BIT(0); - else - h2c.media_status_rpt.parm &= ~BIT(0); - - rtl8xxxu_gen2_h2c_cmd(priv, &h2c, sizeof(h2c.media_status_rpt)); -} - void rtl8xxxu_gen1_init_aggregation(struct rtl8xxxu_priv *priv) { u8 agg_ctrl, usb_spec, page_thresh, timeout; @@ -4525,13 +4492,10 @@ rtl8xxxu_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, rtl8xxxu_write16(priv, REG_BCN_PSR_RPT, 0xc000 | bss_conf->aid); - priv->fops->report_connect(priv, 0, true); } else { val8 = rtl8xxxu_read8(priv, REG_BEACON_CTRL); val8 |= BEACON_DISABLE_TSF_UPDATE; rtl8xxxu_write8(priv, REG_BEACON_CTRL, val8); - - priv->fops->report_connect(priv, 0, false); } }