From patchwork Wed Jan 15 12:13:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 11333951 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0ADBC139A for ; Wed, 15 Jan 2020 12:15:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CAB0B24671 for ; Wed, 15 Jan 2020 12:15:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="Mb8ynQrA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731398AbgAOMPn (ORCPT ); Wed, 15 Jan 2020 07:15:43 -0500 Received: from mail-co1nam11on2064.outbound.protection.outlook.com ([40.107.220.64]:28929 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731538AbgAOMNk (ORCPT ); Wed, 15 Jan 2020 07:13:40 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BXmQbNOXPkWCp7E6tQ1eFaxo5KVu8VhQcVHeCBJ+UXNcCfO5VGeDDj76d5whGmYVV+p79o6Eyzcb1+dcU8RV4NRgHnqfCdIXy4QY0kBtBA8+Zt5k9W21iGuSXspgblsEAup1TjbUji0A9EgA3F38uIencBWfw/KpaHNZRFRIf1KUV+FVI+/r7yM93JmYtA6IncY1n43gQQ4bS4NzpEdQUp2vcfRhoA/7EM2PGIojBGLylfyvdlMBPK/Ny8F6JwtJcU0O6PYymzC2wC81Ne9b5U+Nr1n7G9UF3dvWfun/GWyfNRlG5HqrwT/ZXEA9EH6EO6JTzH7wZhI1d1AQAisGgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uzh1e1358l4KeQ62pZnLo1Vb2AqkkwvyM03nJIeYgK8=; b=dHbhiwv9q7H/N6P5CRdJx0ekcsnFVZjYv/N+wwdbbZCw6VVY/MLrvV/AOO2hSOXQzpGV7YkqCK1gzyz9Whn/xEg2fduDXw+uCKpeIJhH2qVWzVXjbETY00B6x4aytknwmhmdT0aeTqWbLQ9vGlZMzDHQhmNOYAGU0fT3b3zrQg6wYDqKZ0bJgJ5BQHhu80lhfO5520A257D6dZEMDaabEvO3kDrFZF+vi41hcq/i47FYzosA6uKHgmGkLRJn28rC4/fZzYMQzvcwkCw4sHepc+rZ7g4yvbOGszTbgzBq8K/bXo10LIJUsjV3S8Hpwvy667BMCwRoJFYTnx+nso88Ow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uzh1e1358l4KeQ62pZnLo1Vb2AqkkwvyM03nJIeYgK8=; b=Mb8ynQrAEzfsbNfUuzc+BuDjRcK+E87n14P/nnDdWVaKk0z6qaeWsRsiVLeW624hEKF5NEU/v0syjy7mqBvn5fbp8ICaOWTIxqXU4eIFQtrqWO2ZgFws5/tMhfmPowyB+LGIRYrVX469r1nHTNdqq2utCIydYd7L1hkhlm7QU5Q= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB3934.namprd11.prod.outlook.com (10.255.180.212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.20; Wed, 15 Jan 2020 12:13:28 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::f46c:e5b4:2a85:f0bf]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::f46c:e5b4:2a85:f0bf%4]) with mapi id 15.20.2623.018; Wed, 15 Jan 2020 12:13:28 +0000 Received: from pc-42.silabs.com (37.71.187.125) by PR2PR09CA0009.eurprd09.prod.outlook.com (2603:10a6:101:16::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18 via Frontend Transport; Wed, 15 Jan 2020 12:13:07 +0000 From: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= To: "devel@driverdev.osuosl.org" , "linux-wireless@vger.kernel.org" CC: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 45/65] staging: wfx: remove handling of "early_data" Thread-Topic: [PATCH 45/65] staging: wfx: remove handling of "early_data" Thread-Index: AQHVy50meZbmnDLbNEm11vC0VJj28w== Date: Wed, 15 Jan 2020 12:13:09 +0000 Message-ID: <20200115121041.10863-46-Jerome.Pouiller@silabs.com> References: <20200115121041.10863-1-Jerome.Pouiller@silabs.com> In-Reply-To: <20200115121041.10863-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PR2PR09CA0009.eurprd09.prod.outlook.com (2603:10a6:101:16::21) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.25.0 x-originating-ip: [37.71.187.125] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8c4d5665-08d3-4df4-ada7-08d799b448ab x-ms-traffictypediagnostic: MN2PR11MB3934: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:265; x-forefront-prvs: 02830F0362 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(136003)(39860400002)(376002)(366004)(346002)(199004)(189003)(54906003)(110136005)(86362001)(956004)(107886003)(2616005)(316002)(36756003)(71200400001)(52116002)(7696005)(478600001)(8936002)(81156014)(8676002)(4326008)(81166006)(6486002)(2906002)(26005)(66946007)(16526019)(186003)(5660300002)(66574012)(1076003)(66556008)(64756008)(66446008)(85182001)(66476007)(85202003);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR11MB3934;H:MN2PR11MB4063.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: hHfOD4EGUtM7+lN7cyTV+Hf5YX2OOB6MWWssJA6yAPQwDsk7W0jtVzFCozH5Firv08EMA6nEi0LMD0/OSswzc5atXf80PHXNuivEcHqIeZZAAWSYwcLm3cdObqEz0htd36ZyfGKy3e7St5sSSUSAWd8w5YJNm3WuluP7zcTr4wJX9NXuQ8vX0d3B1+jbUqXjiRoHNBwfAGf9JtFD11TUxuqnvbkRMALFwOWCwiKDk7WWz4u/EeD5qplCpBKJ8vZafMXvMmNFPadA/QEM5h3BdP86NRxixQDKXTzSRlbVsleAIueBejZz9LDJNAIxHtRpFVR2DgxsxdaGeDVwLA793G4lxXyEzDbgzOygsIWzLBvfgYZmwg8p4diekmBY558qSmhcB+Mo60RhLV1gW7vYiBEqiWoyUfYJWcNrKVaiElwus20eloB8W00CS08TQU58 Content-ID: <2098199893BB864A869D1A9E07D937D5@namprd11.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8c4d5665-08d3-4df4-ada7-08d799b448ab X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2020 12:13:09.0447 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: OWnyqF7Q7IBxcO8UW2UJoyQzLjZIAS2ljGAXFygrTTn/+1lBTjKZT4dEREYgwJb8EMY9DTE3iU3qVhnDs6Lisg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3934 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller It seems that purpose of "early_data" was to prevent sending data to mac80211 before station was completely associated. It is a useless precaution. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_rx.c | 17 +---------------- drivers/staging/wfx/data_tx.c | 3 --- drivers/staging/wfx/data_tx.h | 1 - drivers/staging/wfx/sta.c | 3 --- 4 files changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c index 0ab71c911f84..e26bc665b2b3 100644 --- a/drivers/staging/wfx/data_rx.c +++ b/drivers/staging/wfx/data_rx.c @@ -108,7 +108,6 @@ void wfx_rx_cb(struct wfx_vif *wvif, struct ieee80211_hdr *frame = (struct ieee80211_hdr *)skb->data; struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data; struct wfx_link_entry *entry = NULL; - bool early_data = false; memset(hdr, 0, sizeof(*hdr)); @@ -121,9 +120,6 @@ void wfx_rx_cb(struct wfx_vif *wvif, if (link_id && link_id <= WFX_MAX_STA_IN_AP_MODE) { entry = &wvif->link_id_db[link_id - 1]; entry->timestamp = jiffies; - if (entry->status == WFX_LINK_SOFT && - ieee80211_is_data(frame->frame_control)) - early_data = true; } if (arg->status == HIF_STATUS_MICFAILURE) @@ -181,18 +177,7 @@ void wfx_rx_cb(struct wfx_vif *wvif, schedule_work(&wvif->update_filtering_work); } } - - if (early_data) { - spin_lock_bh(&wvif->ps_state_lock); - /* Double-check status with lock held */ - if (entry->status == WFX_LINK_SOFT) - skb_queue_tail(&entry->rx_queue, skb); - else - ieee80211_rx_irqsafe(wvif->wdev->hw, skb); - spin_unlock_bh(&wvif->ps_state_lock); - } else { - ieee80211_rx_irqsafe(wvif->wdev->hw, skb); - } + ieee80211_rx_irqsafe(wvif->wdev->hw, skb); return; diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 704ebfe1cd05..e669fc4485e6 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -292,7 +292,6 @@ static int wfx_alloc_link_id(struct wfx_vif *wvif, const u8 *mac) entry->status = WFX_LINK_RESERVE; ether_addr_copy(entry->mac, mac); memset(&entry->buffered, 0, WFX_MAX_TID); - skb_queue_head_init(&entry->rx_queue); wfx_tx_lock(wvif->wdev); if (!schedule_work(&wvif->link_id_work)) @@ -400,8 +399,6 @@ void wfx_link_id_gc_work(struct work_struct *work) next_gc = min_t(unsigned long, next_gc, ttl); } } - if (need_reset) - skb_queue_purge(&wvif->link_id_db[i].rx_queue); } spin_unlock_bh(&wvif->ps_state_lock); if (next_gc != -1) diff --git a/drivers/staging/wfx/data_tx.h b/drivers/staging/wfx/data_tx.h index 078d0cfc521a..54738c2e3eac 100644 --- a/drivers/staging/wfx/data_tx.h +++ b/drivers/staging/wfx/data_tx.h @@ -34,7 +34,6 @@ struct wfx_link_entry { u8 mac[ETH_ALEN]; u8 old_mac[ETH_ALEN]; u8 buffered[WFX_MAX_TID]; - struct sk_buff_head rx_queue; }; struct tx_policy { diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 6a43decd5ae6..4a44d72f0db1 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -571,7 +571,6 @@ int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct wfx_vif *wvif = (struct wfx_vif *) vif->drv_priv; struct wfx_sta_priv *sta_priv = (struct wfx_sta_priv *) &sta->drv_priv; struct wfx_link_entry *entry; - struct sk_buff *skb; if (wvif->vif->type != NL80211_IFTYPE_AP) return 0; @@ -589,8 +588,6 @@ int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, IEEE80211_WMM_IE_STA_QOSINFO_AC_MASK) wvif->sta_asleep_mask |= BIT(sta_priv->link_id); entry->status = WFX_LINK_HARD; - while ((skb = skb_dequeue(&entry->rx_queue))) - ieee80211_rx_irqsafe(wdev->hw, skb); spin_unlock_bh(&wvif->ps_state_lock); return 0; }