From patchwork Sat Sep 2 01:44:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 9935445 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 2621F60216 for ; Sat, 2 Sep 2017 01:45:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1887A28542 for ; Sat, 2 Sep 2017 01:45:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D98F28552; Sat, 2 Sep 2017 01:45:21 +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, 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 9B47B28542 for ; Sat, 2 Sep 2017 01:45:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752297AbdIBBpQ (ORCPT ); Fri, 1 Sep 2017 21:45:16 -0400 Received: from mail-co1nam03on0052.outbound.protection.outlook.com ([104.47.40.52]:13344 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750855AbdIBBpD (ORCPT ); Fri, 1 Sep 2017 21:45:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quantenna.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=vv1OpSMd7PSC12/YtLKNgCUgiDbkM/ymCjrX8ModlYw=; b=sK97a+f3EMrtuAy/SSmtYc6f0rEGyCPmLlJ1b7vJ94oNcG3rMJUrS3WRuffPWIMuQ5bwBLP5WOYgBCG3JMcafi/TqNesuLWsY58ABnt9Ax6Zrc2i+qx7JdRI79VLZkX76kgMEOFL4xNiR3MttfvoeuTRC4UB84jbat/G0+8uPFI= Received: from dodo-dell.quantenna.com (12.131.200.68) by BY2PR0501MB2039.namprd05.prod.outlook.com (10.163.197.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.3; Sat, 2 Sep 2017 01:44:58 +0000 From: igor.mitsyanko.os@quantenna.com To: linux-wireless@vger.kernel.org Cc: sergey.matyukevich.os@quantenna.com, avinashp@quantenna.com, johannes@sipsolutions.net Subject: [PATCH V2 4/9] qtnfmac: do not cache channel info from "connect" command Date: Fri, 1 Sep 2017 18:44:46 -0700 Message-Id: <20170902014451.17766-5-igor.mitsyanko.os@quantenna.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20170902014451.17766-1-igor.mitsyanko.os@quantenna.com> References: <20170902014451.17766-1-igor.mitsyanko.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [12.131.200.68] X-ClientProxiedBy: MWHPR1301CA0021.namprd13.prod.outlook.com (10.174.164.162) To BY2PR0501MB2039.namprd05.prod.outlook.com (10.163.197.26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 34061860-76f2-4a14-8ead-08d4f1a43896 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY2PR0501MB2039; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0501MB2039; 3:CRFi/xe3rxNyu7AIkybM3CNStUCAx38LxcIicWLOQAAAO0ZjqSz5q+yH3l+yqdinSxIaPpg6CwWq6fYl5iX3UsyszbxdvfQQJg6skfjh1XtlrDks3D0RinoI4sOPNk5f5XAQWtvB2RcXtA1NClMdT0jLkTPLzTMCKqYIjtiPIY23GBFQwR1UMyNT4U1m4RJuRSqMV45ci/c0/IFqaDebulKlchrGoTjEfw2hSEHF/tplWsLrR7MNK5Xu8T7vqcsX; 25:LtaUzygNbWp8UPCiKVhH5A03iGOWNDtuY/ZLMDf4kbuVEsdj9XYHIwWCtFMiDWazxGL5ESjflYtqI2RU7kZAt965WjY/64GaujGkGHS/Na2QamLVAgax5MbKdR8OIifnX8BvUk24HXUZ5sH6dReDJEUAayPH72RS3cIMCuewm1jUcxbwuvt5YTJM6GmbbCCf2Zd1nNyiKPe1aNKZGTKyAMvoick5KP2P87K4Wv0ceWSO3woZkEngWFQ6U8bLE9IJ5kYwaCrjCH8mOFNpTSp0yKZKXhkPwqaJzSD3SE600loxSQP0C+auwTUGEiYminDJMGMWcXjimQ3y7ncSlcKd2Q==; 31:6cEO7KN4ZT7LY2Gu8cFiqRjzEtmfakTr9ktA/gz8CsTrgNS07jrugBh4X+nB4Hcnd6KGhAWxes8PND11AxscDzcTpER/kyeiyZHC8E51gBD07iJOJZftVh56bOJUT3kxmjc8YOw3tHheMgxlzSqZIR4CNzgctilNjbH4MIzuMeKzH4nx2Puiz9GfgOG8qaurgmi4R+gjm+fLH6nZg93ZcCmIHgPMUNP8yD6m9tCw2d0= X-MS-TrafficTypeDiagnostic: BY2PR0501MB2039: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=igor.mitsyanko.os@quantenna.com; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0501MB2039; 20:9NF6WVqr3p+HFA3galw2pPlVfxZrKk1XrncQnI6A05M1Ly7vl6P0L/gPdOtTof0LrTWi1wRl8HLO/QKIq9BTtpGSe1tt94nbDgTW7+OeiFO8LONRUV8msmlWucQNXZeWuAZBEQGHpH8f1SsAEKIbkM6v9Rcy4I16nInUsOXTGQ8zWkf4Cy/lmuQxP/Tui0v3ih/KUgBU5SL8yhvEjtYBo4M+0CjYqFx87er1HG3ykIp1uV7mDnDEeo1KYkbIPsbuds35nc8NJYIPC3LVQ401RhCg+f9PMyhZ1cdZw2GJ56oEhivv9/s7vHQ2OZRp+yoe+soFZrlefJl/JTBMIruqbH8WWOWD3lMI+32dUMZwJJlN9TSB4WYwGphCjYLmtJJvjwgMrUjOq+cbzZ/90tytlkfZvKPQo2MW6o8sBJ9zzJweYmiB50r9tTfwr18Co8F0gRlgleHWj4/omLA3qAoO4YLbDiPFPgLz9HEFjTIadehMJJzNKtPQkJhId4JcGE/+dNw98u7xSN2YaDgH/wACnwtU2C6r39PpSlI3LDDamJqGSvWKAq8jyiJPYN06cF264JWgO5gy4G/rH45EqP+Yo/zdzKRWP4VKXLMBfZ9GDgk=; 4:HdPr+EH1+9gRGUaJubcVJffdN2zP7RHlgH9Fp2z0L16Y+H1w+/idai2aGDiBPTUkJGeHVuPLtgalqb543UKPE+cQv1vdRCyhC/kq1wyD1MzA1lbbv8bBKqvy6vTCYksfJ+diw2nxOb46CJi7pB810zsn3pujES9TzN7SCaMvMZbDEaFJWgQgElyHH2LoA3OYg/aQMYtTGypLAm6PfT9yaBl/ohhVAjqZeUQcB/dvyBFqMFk3x1gNT7o3GX2PEsQ9049dZXdi7p3ykYTV37U0nCpP0qbqlu3V9sCr2P/gn/Q= X-Exchange-Antispam-Report-Test: UriScan:(21532816269658); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR0501MB2039; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR0501MB2039; X-Forefront-PRVS: 04180B6720 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(39830400002)(189002)(199003)(103116003)(97736004)(50986999)(1076002)(6116002)(3846002)(76176999)(8676002)(50226002)(81166006)(85782001)(81156014)(8936002)(5003940100001)(36756003)(68736007)(2906002)(53416004)(86362001)(106356001)(478600001)(33646002)(6916009)(50466002)(2950100002)(48376002)(47776003)(2361001)(2351001)(66066001)(6666003)(4326008)(7736002)(9686003)(5660300001)(189998001)(42186005)(6486002)(53936002)(305945005)(110136004)(105586002)(69596002)(101416001)(25786009)(85772001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0501MB2039; H:dodo-dell.quantenna.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0501MB2039; 23:I3MDX3il8x9ClA+A8ciuMltobNBjm+DIEHrIQlm?= =?us-ascii?Q?4BKFhxgtnB+mhXhuTD1SHgqokWCXQ0jQaDkTq1vgmpGSDX7i0OdKct4I2zIK?= =?us-ascii?Q?IyoZ1oX3BsG8wEAdeMGeJ5gv9gZRXOFQjpMp6e/hWIND0rTZcXUXQOX2G+cD?= =?us-ascii?Q?EYvobFqeGfVF25egK+Bq3atqa/uXs3rjl6mB7CMLmOea1WuKP5t6UQOTo74K?= =?us-ascii?Q?2PfsYREeyXOYR30pYi2OwUb1b93tYOJXUC1/U6CYRnKVGBT14FmJzHONr61b?= =?us-ascii?Q?V6lcB/NwpzlrDoTMjcE3baDtClEcx6w0MOHKkNavtHvGbQhklYvqzg2lY8JC?= =?us-ascii?Q?CAcFNHLrZs6M9Ou8gYLRZBBM1qknu2UlfDGrEWWlr9Oc73STqg6+NvS30e6x?= =?us-ascii?Q?5KF2dud126ql/yQHzsKyh52mTxyWhQkPyL2YPu/oYIu/MNNOxsbMYZXt4xnb?= =?us-ascii?Q?cPWuZhR+RJROnPelD9r4S3LXjT3lEOa6psXxSMhUJeU9c42PeMoLkprFEzDd?= =?us-ascii?Q?wjZ9fgshUK82YxTK5S6s83zobYjEalc6lGpEWq4EX403OTPfrITSZZfh3RQw?= =?us-ascii?Q?FDuUHisvFZ9VTYNZotOXYrMSbMbZqSUT5IYmJbOnEIwTEtuEkOM7zsJYoLzA?= =?us-ascii?Q?tqM+vtAWGDEMexE6nybQudpkteuqhuZGNwUEr6O5B1AIVoGZZa6Uw9qomthD?= =?us-ascii?Q?NzZq1wbO8gKCGmwhxo0NXQ0NEwz+R3spanZzfyvucSlIoxD5as/QoEy+vY9b?= =?us-ascii?Q?8sJzbkBC0kC5vbDcApMiXnCfNPEf36OHFjfG81cX0+BsdGgFcso6HYTqf3Y9?= =?us-ascii?Q?jvz8ASNd5OD48FATWDD8+t1a20CwJjdiKmHDCzLp4JHPfgjxoFbHbbkUUZd8?= =?us-ascii?Q?QZ9dHjzvFI6SwqGjyqOVMhwhyG04D7P3rl9M09tLYU/Don222TjfVTpMSz2Q?= =?us-ascii?Q?wL5TwvYs5oSISlscPDjnPMYFeLnJitDIcEwvv0fgC089fgRcK3xBOn7VFPgB?= =?us-ascii?Q?KD1/01lO2rWnNQ9wqsucOq74VfpLo6uYMcjI+2QTqrOMMiWPu2EBjXF0x2mX?= =?us-ascii?Q?0j9uBojH1opK2eiHVkZ45sDL7vpywBWsL8R0FSODQY/egv4E8rlOfyfHPp3B?= =?us-ascii?Q?NM+anACuDm6VpQTz3LnS35W9AJ5dr1SEfPo+JcLz3oFYNXpBA06HLVBQjeKU?= =?us-ascii?Q?//ZbOnxT4HPyzuRg=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR0501MB2039; 6:8is4EVw72FP5NrzpMR/XR3HH1avCpG32IdT2ZzSM8KCEjvXGV+ECTfCjYUYj/0nubgi/ep9kSw//G0EwKDNFI2isWNeEzdjJuswj5U8USqtYX26vWSjX1KpaSMprERyMj2HVI74PQeR6q3nQ+BsCNXvpy7WRllDx6ABaTWWjpyg5VWeetqtFilbtpLrtV53/9JsmRUgX98aK5rCYd87G4CYydcXETgkE+/ePZ9fmo83zyVxjF3+iHfteRplPXQCOsBNzX09whx4aLMdSasMUTQGPhFoXrR+RWwXCmnKz4fbd9ia+i13RzsabPhGQBh9rY1ZXTBRs5WiCxnSrK+H7EA==; 5:QewoCv1v03wLWCGwiUpdrM6z6d37f2VaXk47kUjCOmbl4bGpkZzwRsP8ZBPYMT5AM6IdkCTiXPTr+XCKuLw9mp0gWkdjzDW5CfOZNcd8ObaVn0RN2AXAnlHfW2H97k+YFrB/aKgPETI1XYiaBMXfLQ==; 24:xEtBn9Um2YdzTHayEvyHgyL7/Qb9JrlXN2bba4OyKpz8Yhc2mGPODUCrP0FYLHvs5aAIR2rFck7SItyz7iiJ7UjTU9oQYdk0/EzH4FJakIs=; 7:xIxENY2+/PLGo/ZoBTFk0ESk2CqdJaQ9OnT5R6eQvYQ+A27Gl5nME/ISpnYZrkS9z9raXns4IsScexNCWT/4UxGA66fRCp4af/A6BFzs4Fn6SRdTiXVKou1Lxeuce+hlRJA7gvD4idj/8yUGCjHC8H/hIlBHN4yroXAZFvDAsfBY8g+uSR9p93SLmFor+YEqsbLnG4Dp928Nzcn9FXlJm9Gd756e3Gokd9A4hXrRi3s= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2017 01:44:58.9435 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0501MB2039 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 From: Igor Mitsyanko This makes no sense because real operational channel is choosen based on AP operation, not on what STA is configured to. Signed-off-by: Igor Mitsyanko --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 15 +-------------- drivers/net/wireless/quantenna/qtnfmac/commands.c | 6 ++++-- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 0ef1285..17b323e 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -613,8 +613,6 @@ qtnf_connect(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_connect_params *sme) { struct qtnf_vif *vif = qtnf_netdev_get_priv(dev); - struct qtnf_wmac *mac = wiphy_priv(wiphy); - struct cfg80211_chan_def chandef; struct qtnf_bss_config *bss_cfg; int ret; @@ -627,18 +625,6 @@ qtnf_connect(struct wiphy *wiphy, struct net_device *dev, bss_cfg = &vif->bss_cfg; memset(bss_cfg, 0, sizeof(*bss_cfg)); - if (sme->channel) { - /* FIXME: need to set proper nl80211_channel_type value */ - cfg80211_chandef_create(&chandef, sme->channel, - NL80211_CHAN_HT20); - /* fall-back to minimal safe chandef description */ - if (!cfg80211_chandef_valid(&chandef)) - cfg80211_chandef_create(&chandef, sme->channel, - NL80211_CHAN_HT20); - - memcpy(&mac->chandef, &chandef, sizeof(mac->chandef)); - } - bss_cfg->ssid_len = sme->ssid_len; memcpy(&bss_cfg->ssid, sme->ssid, bss_cfg->ssid_len); bss_cfg->auth_type = sme->auth_type; @@ -663,6 +649,7 @@ qtnf_connect(struct wiphy *wiphy, struct net_device *dev, bss_cfg->connect_flags |= QLINK_STA_CONNECT_USE_RRM; memcpy(&bss_cfg->crypto, &sme->crypto, sizeof(bss_cfg->crypto)); + if (sme->bssid) ether_addr_copy(bss_cfg->bssid, sme->bssid); else diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index 806b88b..c55bae1 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -2055,8 +2055,10 @@ int qtnf_cmd_send_connect(struct qtnf_vif *vif, ether_addr_copy(cmd->bssid, bss_cfg->bssid); - if (vif->mac->chandef.chan) - cmd->channel = cpu_to_le16(vif->mac->chandef.chan->hw_value); + if (sme->channel) + cmd->channel = cpu_to_le16(sme->channel->hw_value); + else + cmd->channel = 0; cmd->bg_scan_period = cpu_to_le16(bss_cfg->bg_scan_period);