From patchwork Thu Sep 21 21:34:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 9964851 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 03FFC6056A for ; Thu, 21 Sep 2017 21:35:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9C0E28DD3 for ; Thu, 21 Sep 2017 21:35:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DEAA029680; Thu, 21 Sep 2017 21:35:25 +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 5116E28DD3 for ; Thu, 21 Sep 2017 21:35:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751801AbdIUVfX (ORCPT ); Thu, 21 Sep 2017 17:35:23 -0400 Received: from mail-bn3nam01on0076.outbound.protection.outlook.com ([104.47.33.76]:20316 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751763AbdIUVes (ORCPT ); Thu, 21 Sep 2017 17:34:48 -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=iywLNRW/XE2PMUKhZiT9mKvvcOxoB0J8Fgrmli6J+78=; b=wnvLvOTu83rLqQZqn6W75R7XXdK+R5yNUrCKXp3rQvDYWje9zGUn1JqKZr7td4ykxdWqivmNfBJxN0S/jDpXRvjJ0WpeIPRP6Pprg6BpuYh4j2xBrs8rOWjnGgRCwJJObGGherneCsL0p9gTzQ1sBvi/uRJ7AMSQBdqxzpVN/54= Received: from dodo-dell.quantenna.com (12.131.200.68) by BLUPR0501MB2035.namprd05.prod.outlook.com (10.164.23.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.5; Thu, 21 Sep 2017 21:34:45 +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 V3 2/9] qtnfmac: make "Channel change" event report full channel info Date: Thu, 21 Sep 2017 14:34:30 -0700 Message-Id: <20170921213437.27457-3-igor.mitsyanko.os@quantenna.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20170921213437.27457-1-igor.mitsyanko.os@quantenna.com> References: <20170921213437.27457-1-igor.mitsyanko.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [12.131.200.68] X-ClientProxiedBy: MWHPR13CA0006.namprd13.prod.outlook.com (10.169.208.16) To BLUPR0501MB2035.namprd05.prod.outlook.com (10.164.23.17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0aeeda72-805d-4047-3649-08d50138948b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BLUPR0501MB2035; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0501MB2035; 3:T8csFoOjlWMi/PG19/za0JH1dwPtTpDxGxsh4wJ74KTEfzSpyV3KLlpKRpJB03Xa2aYMJN0n5OKZHu5WobUE2HU2cC7+IPtbXnoEmQWaLMk6BWHira5im9TwpXxiKG6+2lheUc9f2nhNjrx0HZV5kHyaH6Zj0Hdq4dAWc14Z8KdS27Y0g3/GzFlkEFaQCCRpLchwZd7QTtUXkVKc+H4l4uSiTVmEfkYzcaD0QcaA+ZMhcVfd54intt5oODUNzBog; 25:2vqtsFslTOFW4db2gfGNwPUR2+lkB2hHEzKZ5Wu9/mZEZLbF28ZII3pOGpODO6dudW2cCzHxyNkSxReWYC81oUc1IcLgJkUGCWccYHhoQpxQ730Q7kt2aABaaqoeq/1iP7tI60fK6jHupudFRLJ/BdepkyygTNgQ8wakRlFgAAWURYxmrubE/I5lYeIMLGxOXcFm3qAD7JeYRGqj7v/9FVTpzk8OmNu9cba6o24hjbz4ABEzSP4IjmnTjCyTibn3fD+SVOoQyGtAOa0zJt72jC340DpFPC8vmgck1S3cygKdLqNaEQTXfee8iKtj599HM149Pg8DBx2ujoFR0SZVig==; 31:ebM55b4NUySavkEhT6ifmiG9EQ0XwLR8ItPgXKJm8q9kFyfBS8NT575KbrNeCnIT2+1DOwhmj96QhTwswztptKfwYoz9lBc26fzvvUY8ruY5aJbCIMvk4Ipe0nezhUrJGMicRSBuawb1VF7FBX7Du1Un0fjbMtr8vGN/l3tIZgZiaWOnuRz94pTmQ7crkfqAz0kz/6vVPg3zdl+jqIB7i+wE+AN1wLOFMGXpuHHkL/Q= X-MS-TrafficTypeDiagnostic: BLUPR0501MB2035: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=igor.mitsyanko.os@quantenna.com; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0501MB2035; 20:807MuIcUUknqnJKHoGDTEr3DFn9g3Rg8OFBy8TdsU2fKRwqEb9kO7Qc3/SSnm4Mt2ZRrSEirU35mQYW3VWo3P7LKChiLtJ+K9kwc0/U/3XbSaqPOL8Al6PnvTGlh9K+o/SagUNz2qY89mFd4bUQKxeFA1B3l/9q2dL69TtdB6yuA5w0W8BW3Di1V1gKRL2/E/9zZZKkuNwvTN9T5gn8kqF8KdlovqufHWqe+a4AXOH5pOuOMVoI7J3WTWMgnGcksoSe7+/Hp1WDncoqBafDC+yZSJnsoQtZpYTg6BuJX9J6YIZkRy3yH7izb5g1C8g8wzxyHWkXc7mMbigSNhL20JDJevQf06a59zHCWWxBLBP8/sOjfcSPsJuggC3aHvYz2UO+UoUaiz3xOXy9SSKftKH++yqWdc5VleLurOduoc7HcEU8/FZ8IiGsoT5IU+/mIOe01uSoKhLbemYioFhozevUy1pgt67ze0QM4agFEQr2YkBy333uG6K46GvY80JYen69MNnM6TrPEZSXAX4wRRiidhcOV0MsQx3LDfAbubrCeOqOf1cCVj8ZCL74rrZs8ewm5nu1R4a5z+vts/4tkzUm5zRiSyAqGw3PyOGWfKyI=; 4:bhBWVuTFX+LL25eRZqlbkrSFQDB8+LdO2LuUORton7vtO3ym5p2DZyYOlA5RjlV1rqcN0AZWkBMhtoo2iogYlHJTSUIFz6RnxyTMQYP58+dxTyNe0bNGWqXeUW7Elu8CK47jxRzp21wmqrUqiv2jeyHnhWtQ+EgEHXPU2vh7UBQBMOaSy56Y7A59eINI8dW7xdh8Z31iFmoghrox7IvQsm2sgpVM2TwJ+upzDqS2Txn66Sm/vovDFS4RdgFy56dw X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123564025)(20161123562025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR0501MB2035; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR0501MB2035; X-Forefront-PRVS: 04371797A5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(39830400002)(189002)(199003)(106356001)(2906002)(105586002)(6486002)(6116002)(53416004)(48376002)(9686003)(50226002)(3846002)(1076002)(36756003)(103116003)(2361001)(76176999)(68736007)(189998001)(33646002)(66066001)(2950100002)(6916009)(478600001)(50986999)(50466002)(47776003)(25786009)(2351001)(101416001)(8676002)(86362001)(69596002)(5660300001)(81166006)(81156014)(305945005)(53936002)(16586007)(85782001)(7736002)(16526017)(6666003)(97736004)(8936002)(5003940100001)(316002)(4326008)(85772001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0501MB2035; 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; BLUPR0501MB2035; 23:o9JHiEUYO/72FoXJYA6SBVD1V+fSqkR8X7ySiHM?= =?us-ascii?Q?9zEkdXLgcUnI0Ca2nthKPvFKhjmD1+Fx0O4YYoXcmrxdAkEpsqg4RbmztI/R?= =?us-ascii?Q?AxWIsVQ42O+l6jeUNjQSic6CAR8JxAYmq0iVGyZkq6DvTFOSCMO3Mn/pcrKb?= =?us-ascii?Q?Uby1xgN2Ark9kv7qEVl++Gsui3sTeTo0QT6N+YRfWCvM4VU5dCYqgI3H7yEp?= =?us-ascii?Q?jRcwrAKWMLBXFitpYtwLWt/Jwv6GoDOjAkx13PPqN8oO/EARn6slb/XA8k4E?= =?us-ascii?Q?phMMN3WCHkVeIkIYlfqaKGTdCHuaqgPxh9Cx1B8hOQBE7kwSxBkvGKv7suuY?= =?us-ascii?Q?HK+OyniyNZev2UlKzi+GYiUmWvfiQyBeirM+Qk0UXODc3meYD7RQdtzcd9op?= =?us-ascii?Q?jyd0xLBGyV9s64EoewMyGwAEKADKPgVAvcWtIbIDxHe3HKmHMhKKzwCp97z9?= =?us-ascii?Q?CNQSaD3gyG3EZFH+cla67a+ONkmUXwZuxQmn1KC4rz6kDvVumkosLdzhhVwr?= =?us-ascii?Q?h3rA8dniPKHWwSZSurrvKFd0znyHcLQvX/g8gX1SoJms06Cpz2e+cjmuB0Vy?= =?us-ascii?Q?qD4GS17e3DLuJLOZMDSGSI4/yiMALs5OOVRI1DNW23BI6z4F6I+KJTbmDEVl?= =?us-ascii?Q?wspNtxkbKPbat2eqxgW2EvWZifqlfzpQ6ec2x7RgUPkuP0MlF08aK1tBjTcu?= =?us-ascii?Q?zxmWMHK14fp3ZXXdR+8Y3xsQxYlW/6mqqQTde8kUz1uWc+6YPZL15lzQhTpT?= =?us-ascii?Q?uISsrGdtja5xhz7E3f8Vb7F1sc+MKVU21XS1AADSNVo3pJDnn/MjPga9cMI3?= =?us-ascii?Q?GCAOo5bpZr+IVNhYtUEA3SUrZrScxLJsWg0BxKqc9O6jk2ov55rJ4jdNeDJg?= =?us-ascii?Q?K8JXkRcDiYn72EpdMIlrx3mOZmIJLs/G9ugVRtoybZjme96lFj7nBHM+b+c2?= =?us-ascii?Q?49qsaXGfSOacNSKesvJH8McJvij/wHvQK2jBKfpga25MTOe6kE5sPQ8LdDdR?= =?us-ascii?Q?kreiFLdtIPm3uDQlD/e+trBcahNwE7vYIVqA36kYlH2Y+0kCIei3J/ZCPQz9?= =?us-ascii?Q?TCsKwDOwI/X+fjwliw0KzpKoSeRx4KRRdgeSOBTZWiGG1ha1zg51F0kWpJyM?= =?us-ascii?Q?u6czwH+Qa5rNEL8j1MMwU6DiQCmx84VXsF6ksq7dlVCCSKsaLTeMZ0tefjRF?= =?us-ascii?Q?RadEZ7Prpjih+DUf8RgMgxriWNAlUnJlS20uFRI2I2mSPzzXcKbXe6gA/HA?= =?us-ascii?Q?=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0501MB2035; 6:rqRAi7x5YjpJsFbp8rthlaUtkO+0YfqbdjeMTcrr9xV0qP2DhV+C5qatxYsnl5oD7I8NIT7X6NWuj2z66YdvZoTgb1Jq5xFVDq/Tl3roke7CQdb1KImA3+UfH5Jjd51XCBdrTEV73xtElWQG/0tc53X6KH+j7E4Teefvn5yGg7CF3L9ZypnMtO3tC6aOPkN3jtkbfmF5/1I8oEqLKpJ0cedwv6PqaWJ+RDi+WwUWUhkVFCbdBvlBSuvg5BCCGBmwSg5s3uVAo5NIUblm3YKIFgZXMs4oW/5TjsJeQCP1EBiDnahOmeRrxwKIU2NmAfsl7v0dn+eBvCXuO5EZTjGMAA==; 5:kHjzmERm7anHCZNeyaYIphjyEtlLr9AV3C9KH5rLRAWoaFrDjyvlHHqWrkp3O1AUcU0XJ8VCRgvgwNBmyc6qfZriJa5gcll9Uo+bA8PnYAQaSi5Q9JMiQmDYGlSccZiUD2eov1OLYms4yybyxJL7NQ==; 24:8I+w58cv779u2KIbQRQbpEYeKus72k3y8qRG8WxUScaE51k4s8NCAscPhUSsltOWhJimCdiPQRj0cvurtFPsy7hnEBaoxIAi87bTBr8xFlk=; 7:9VbZ9MFA8vyvxN/SCAyIxQ1CUmh1V0FPrZgCSS96XLgeNFKcKXQrnQXaUrGAvhiDLxI8A7tjly4M2pDDmhidYaSGsubLtFOOgxjDPYkfLiKiiAq6TVCrrhh3iTBI1e9UWmrI0gw62/5MFvXZSZzURtB3esgAcI7DweegFT1Ju70OBSnVHZNVQFph+j/Ua0pEOTH3kVEW+dplUY2U1oNXiN5lmiyETP/H/f5aCy+aqJM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2017 21:34:45.0208 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0501MB2035 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 Specifically, it has to report center frequency, secondary center frequency (for 80+80) and BW. Introduce channel definition structure to qlink and modify channel change event processing function accordingly. Signed-off-by: Igor Mitsyanko --- drivers/net/wireless/quantenna/qtnfmac/event.c | 29 ++++++------ drivers/net/wireless/quantenna/qtnfmac/qlink.h | 18 +++++++- .../net/wireless/quantenna/qtnfmac/qlink_util.c | 52 ++++++++++++++++++++++ .../net/wireless/quantenna/qtnfmac/qlink_util.h | 4 ++ 4 files changed, 85 insertions(+), 18 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/event.c b/drivers/net/wireless/quantenna/qtnfmac/event.c index 0fc2814..df58e83 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/event.c +++ b/drivers/net/wireless/quantenna/qtnfmac/event.c @@ -25,6 +25,7 @@ #include "trans.h" #include "util.h" #include "event.h" +#include "qlink_util.h" static int qtnf_event_handle_sta_assoc(struct qtnf_wmac *mac, struct qtnf_vif *vif, @@ -359,39 +360,35 @@ qtnf_event_handle_freq_change(struct qtnf_wmac *mac, { struct wiphy *wiphy = priv_to_wiphy(mac); struct cfg80211_chan_def chandef; - struct ieee80211_channel *chan; struct qtnf_vif *vif; - int freq; int i; if (len < sizeof(*data)) { - pr_err("payload is too short\n"); + pr_err("MAC%u: payload is too short\n", mac->macid); return -EINVAL; } - freq = le32_to_cpu(data->freq); - chan = ieee80211_get_channel(wiphy, freq); - if (!chan) { - pr_err("channel at %d MHz not found\n", freq); + qlink_chandef_q2cfg(wiphy, &data->chan, &chandef); + + if (!cfg80211_chandef_valid(&chandef)) { + pr_err("MAC%u: bad channel f1=%u f2=%u bw=%u\n", mac->macid, + chandef.center_freq1, chandef.center_freq2, + chandef.width); return -EINVAL; } - pr_debug("MAC%d switch to new channel %u MHz\n", mac->macid, freq); + pr_debug("MAC%d: new channel ieee=%u freq1=%u freq2=%u bw=%u\n", + mac->macid, chandef.chan->hw_value, chandef.center_freq1, + chandef.center_freq2, chandef.width); if (mac->status & QTNF_MAC_CSA_ACTIVE) { mac->status &= ~QTNF_MAC_CSA_ACTIVE; - if (chan->hw_value != mac->csa_chandef.chan->hw_value) + if (chandef.chan->hw_value != mac->csa_chandef.chan->hw_value) pr_warn("unexpected switch to %u during CSA to %u\n", - chan->hw_value, + chandef.chan->hw_value, mac->csa_chandef.chan->hw_value); } - /* FIXME: need to figure out proper nl80211_channel_type value */ - cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_HT20); - /* fall-back to minimal safe chandef description */ - if (!cfg80211_chandef_valid(&chandef)) - cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_HT20); - memcpy(&mac->chandef, &chandef, sizeof(mac->chandef)); for (i = 0; i < QTNF_MAX_INTF; i++) { diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index a69fd470..5936854 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h @@ -118,6 +118,20 @@ enum qlink_channel_width { QLINK_CHAN_WIDTH_160, }; +/** + * struct qlink_chandef - qlink channel definition + * + * @center_freq1: center frequency of first segment + * @center_freq2: center frequency of second segment (80+80 only) + * @width: channel width, one of @enum qlink_channel_width + */ +struct qlink_chandef { + __le16 center_freq1; + __le16 center_freq2; + u8 width; + u8 rsvd[3]; +} __packed; + /* QLINK Command messages related definitions */ @@ -764,11 +778,11 @@ struct qlink_event_bss_leave { /** * struct qlink_event_freq_change - data for QLINK_EVENT_FREQ_CHANGE event * - * @freq: new operating frequency in MHz + * @chan: new operating channel definition */ struct qlink_event_freq_change { struct qlink_event ehdr; - __le32 freq; + struct qlink_chandef chan; } __packed; enum qlink_rxmgmt_flags { diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c index 369b77d..3c1db5b 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.c @@ -75,3 +75,55 @@ u8 qlink_chan_width_mask_to_nl(u16 qlink_mask) return result; } + +static enum nl80211_chan_width qlink_chanwidth_to_nl(u8 qlw) +{ + switch (qlw) { + case QLINK_CHAN_WIDTH_20_NOHT: + return NL80211_CHAN_WIDTH_20_NOHT; + case QLINK_CHAN_WIDTH_20: + return NL80211_CHAN_WIDTH_20; + case QLINK_CHAN_WIDTH_40: + return NL80211_CHAN_WIDTH_40; + case QLINK_CHAN_WIDTH_80: + return NL80211_CHAN_WIDTH_80; + case QLINK_CHAN_WIDTH_80P80: + return NL80211_CHAN_WIDTH_80P80; + case QLINK_CHAN_WIDTH_160: + return NL80211_CHAN_WIDTH_160; + case QLINK_CHAN_WIDTH_5: + return NL80211_CHAN_WIDTH_5; + case QLINK_CHAN_WIDTH_10: + return NL80211_CHAN_WIDTH_10; + default: + return -1; + } +} + +void qlink_chandef_q2cfg(struct wiphy *wiphy, + const struct qlink_chandef *qch, + struct cfg80211_chan_def *chdef) +{ + chdef->center_freq1 = le16_to_cpu(qch->center_freq1); + chdef->center_freq2 = le16_to_cpu(qch->center_freq2); + chdef->width = qlink_chanwidth_to_nl(qch->width); + + switch (chdef->width) { + case NL80211_CHAN_WIDTH_20_NOHT: + case NL80211_CHAN_WIDTH_20: + case NL80211_CHAN_WIDTH_5: + case NL80211_CHAN_WIDTH_10: + chdef->chan = ieee80211_get_channel(wiphy, chdef->center_freq1); + break; + case NL80211_CHAN_WIDTH_40: + case NL80211_CHAN_WIDTH_80: + case NL80211_CHAN_WIDTH_80P80: + case NL80211_CHAN_WIDTH_160: + chdef->chan = ieee80211_get_channel(wiphy, + chdef->center_freq1 - 10); + break; + default: + chdef->chan = NULL; + break; + } +} diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h index de06c1e..5e49a8a 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink_util.h @@ -19,6 +19,7 @@ #include #include +#include #include "qlink.h" @@ -62,5 +63,8 @@ static inline void qtnf_cmd_skb_put_tlv_u16(struct sk_buff *skb, u16 qlink_iface_type_to_nl_mask(u16 qlink_type); u8 qlink_chan_width_mask_to_nl(u16 qlink_mask); +void qlink_chandef_q2cfg(struct wiphy *wiphy, + const struct qlink_chandef *qch, + struct cfg80211_chan_def *chdef); #endif /* _QTN_FMAC_QLINK_UTIL_H_ */