From patchwork Sat Sep 2 01:44:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mitsyanko X-Patchwork-Id: 9935437 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 0075560216 for ; Sat, 2 Sep 2017 01:45:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E694D28542 for ; Sat, 2 Sep 2017 01:45:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB6BE28552; Sat, 2 Sep 2017 01:45:14 +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 165DF28542 for ; Sat, 2 Sep 2017 01:45:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751357AbdIBBpC (ORCPT ); Fri, 1 Sep 2017 21:45:02 -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 S1750855AbdIBBpA (ORCPT ); Fri, 1 Sep 2017 21:45:00 -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=kmVuytQJi5wBbxGTOg7NJJ3zM+zjxPNHDRZ3Emgw4xlKBtYbA0RuSfqMvOD6yUTfE7btH3sJA+AcaUvm6GuEIFKGoZYe/+i3mwtXOkI9sNu1XKBxXKcfAI8cCPCpQDNyzmceYaJtJ4RRhDSr2FloNQ2P2ML+YzjHKNX/3HWLR+0= 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:57 +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 2/9] qtnfmac: make "Channel change" event report full channel info Date: Fri, 1 Sep 2017 18:44:44 -0700 Message-Id: <20170902014451.17766-3-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: baadb98c-1c81-4e56-d278-08d4f1a437b8 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:RVNhizZFxjpA4PBOPRBHLZQu6TLfyaztUlJdiSWqI1rf2eh7qOh3ogSuzi6Y4mSUOiR+w59vBxt+EqcR88x17bJrrea9F3Efx+jfTXCxvnVNYQ/py7eYsdp/GX5WJ9APOCoE4MCjk/0gb7u4e+X8sTh689pbLNgX2QKLn6GoTAxVDwLNaplmaKNraKRa/64mvnlAMBqZn2o9W4XHLrDmkaLYZawiXav7W0LK2E4g3bqTxOqkdzV6MGScziezJk1Q; 25:BomvvUhVmKM/fzCk2ym1A7EWzRSAwF4MqWSPLRt8m+JivcwYweTVMgh0OClPeiA0ZYdDU5nrDsLdQu7sUKdHAuOjLyjlihO8t37RpMqD10sRzgYhUXEwS3C8KDKN7cRt37UnUCLU2/Eq7BWOTjJjig/YULbhy5qhhx5fh8dYo8lXPY7Dj2m9W6ZKHKsX7mfHKGCosYvXCQODCrQii7i3Psa8EzMLPR5IS2Qnh6Phn+mAyhMaOvTG8ipcRH5la2c00BbPPExROqiJL8LPH7pEp2sxU+/zJedD8Y4k4RMwKP9QOkq6O8nKbbmca38e+EyjO8jBbJH1eAsioIkeizwfdg==; 31:LYA9SqjHA1Ra+axdbifHymlHRx7YFMOfjiRYAXF25uL2lZLz9msFE+jP8TahVLniTc7LWYo8gqYnPNPPEg29mDHybnIPTX80U3FtOu+CqtZ6CWptw81kWGo6cDta554WSpOnJpysQJJEHjzG5prCPx0o3KsXDY5EY7pXEB4Gxubnukl+HieXKlsFJpkNxlDJeLQnmbP/uKiKIJ4mPZrDI705t5MKLZSd4WhhYGQzI8o= 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:daZsBAyBcsbfNickAbVllJhggHkURukgmuNGb6i3lR8qAgC52aQ7j38AySh7T07B3xTKys+oJGW5F7QUumVhcxENsC7dAKnHDayEArp/9J5r8sl+TygqDKb3alOK6SyAEddzzbopo2k8c2rYyg57AdFeOSZNcv2xeSqdR0sfVpRQC89oaNiPLrsGm7FXgSmYA4ug0Mq0irAwwyU5lmJ4voExUPDloQlpDD1cfVoL8n30hk7+WE5dHX+vQdWU1FuojPYWHncEIzvHal2/APxNBvkOHrCqy+/lmew++U5mIDNRkzT78fKFCTrQ9dtKfwnfLQ0+uUyzjNKQofQZtr3HYG0w6Jp98paQi/R1TCohzl9EG183/jdFf9gXMhC0mfpm3PGz9c1Lco16fnFxcliXrbmw8sEwfCUSAYojB26l3W5bewGbYCF7kpI9+rDiab9j/GVs2Pz/g2m07++vGxtMNFXAYvxULOv0HUouIiLnt8KjB5u/LaB9g5Fk6fORiXDoVsCqYqFnqsBPInxHv0izJVpetBklWhmZ7Q1e+udgLb66wXSVCwJ1fd6CQAWe/Lfmjc379ZrZp6QOcko+5BLtby6qErPoWIMCMytcsqzmfLc=; 4:Ihtclkt/1oIm+DfbJHuMgp/ye3rffLvVfgYyiafxHYTqjgJiOSQN3d979nVJy3pXa9ma86j5scChcez3f5oUNPPRQgIuNraNdmrBwO6V6wyuqny8hRZbsAOlRpknhz/cRHaoSXd4NdjSzMSeDT2qoSr/lDIpqjvhOy05hcf7cf1GUTC77t8dZcBxPQNBgkySdL2BQA8trTbtFplk2HaJYSsRsRocOxMLmyrQroa5HHDFAD+FR2DccgXxK4P1eE3i 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)(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:kgXP46n0U78JP3tWbKYgba2YoluTivb9cAift++?= =?us-ascii?Q?eH3o/EGxCh3WHwff2XaLFj6JlkBhWLkj7ngiz1reFaNhFYA6cTpGgRKqHIRc?= =?us-ascii?Q?9oV8DFMp3eJSxJsQBUKdbNeW7A43TTkKlMSjWBgESS9d2ywNrqSuBuOt2B4+?= =?us-ascii?Q?7tdmOQhdyb4MP8kU/FLPdq8gij8PTT9sWnTVB6McEhAUSN3+08Ci2TN6P6/c?= =?us-ascii?Q?QRPZmhTRyvkZSnhwzHXA8kxvDNjBLxKSsZQS6g0F6jXJdraX8TLOzbywqsS4?= =?us-ascii?Q?7f08jeMPqDydoLv42c5jNccV2vxbXr7OMcm4LDNK6ontjekuQNOFLxLoGEqZ?= =?us-ascii?Q?vxb74hAsMPJ6DuCerwiSqRWmsU1rBfW5K8/RwAl7CoIKs+or3y98Bq0Bfzkq?= =?us-ascii?Q?D0H5YObaZfC6ATQx67/IZy3eHEiQaYyP2032NQbmRcj0X64/J1aBynU0PFor?= =?us-ascii?Q?jdu4lNpZOoKzsBu3YDdxpx4gdk5F9G6bo4PNpMCtjwGgLEThhhManI4GTsWc?= =?us-ascii?Q?aQo8T/syHfvNXC3Kp2UfO9voKg42wZIUcVVJ3/ytiAXaF/LO6Rh6sAobvnI5?= =?us-ascii?Q?IbDVJWchcHp6C9B/CHNzttJMefrkylzda8KuKV/hzXvNfYYk/T57ke4bSFWI?= =?us-ascii?Q?jRiJn3C2XuuRhsKQEEtZCJtzPfqweDEIGrFBQ6Nx2AqpxYEmxErUURtV+3hg?= =?us-ascii?Q?4JlTxdozHd+ChlcrEDYwSNQsnwl95O0f5BzPpFLxlqzQmAq87maLe0hDSKVg?= =?us-ascii?Q?U/kBSOJs06bJrgJkHketSMyRJna3rjZW7aNOnBAcYVuUzDLoumhchVhKsMGy?= =?us-ascii?Q?MIDAH/kNasFs2jqc3Rdla2LRWrl6O0wyRA8NbspPBIQmxOjBS9jzg8vY4aeJ?= =?us-ascii?Q?8nKuwrySuU10EuSN9yf6LGXjhdRqH3gUxXtjMPgElspeWBsE2Ni662atVSyC?= =?us-ascii?Q?XkiftsPsV80F7IcV4gbgrxYXsuwo/35zIZU4+LTHTDcCdk2tL6dUtNyGUlhc?= =?us-ascii?Q?SWao1YnWmegw9Wst5LPZLoUpNq9nAlVQq3U8QBOFHpPEJT44CATSLdceXsEc?= =?us-ascii?Q?NrN1Q+/ZPbkfTVTDpPXz8+NzjAux00fa1BmdHkd6cc/ifhvukiTFo7cmMpTO?= =?us-ascii?Q?Gr9fmXB4/fnYNVSDwNMjHMqYC5ZntpeL5EXA05biN/kVlkhu732L/MzybFZa?= =?us-ascii?Q?X4wZ8NyjuC4UpTsE=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR0501MB2039; 6:FI9guMunfrfy6Rq+RDAmOkmz0MIGy0b50i5LGbWxA9tNjui6OoxGqWYxDI9Z+RxBixAW1o5wMaOuxD1KLGhP2MVLWFnsW9SNxy+GSFHVdZs+qMT7zJA7vSlO9RcyTEPW9NI7xz4ZzQMJ+nMTk69lh3Y0sRBVbGv5mU89/ybAezTdeEP3HbK8e7Hc6bybzjpIB8dMTgh5O+MKnz7NSUJZx6U9bpuRgh8zYcEjwKMpGXqG4++JOQTt4r1YdbespYSQcOjlYLP3oS1cMJ0P7WZbtra9ALO4FBxwDNn6GNC6G6bil9jaRbu0DfrS9l4hS3gETdO2TW7KLwTr12PCeuByBw==; 5:eMqJgx19SItYp67E//avaTn5qkQDXJv/Nh1Kn3oAhAnnWZkXNRv4NzopEyoVY/TslP3bFSlA6vRVRx4GD1Z9FWXpeIBTNS3vPiUPoYVZXRIddICmlvdUpJ7wZtuwhymKkv+QUmYNhfOJ3tsXOQFqWg==; 24:NSz6tuBX9dCthA+FEM9lnUgsotejWULR9nxwYrl0nRJnLRNpMiujGIpx8ohmNjUYXuPEdpKGW8VvyhbXrLOUgKOO+8Wh1o3kcf76ZrsAk7g=; 7:acNWX4E83m2OjqfqHtFxJ/fJqbDrj6/qCbwsL+WUg5rtHwQKZkpB5+55WvBPlxmElT7zCJ+CCdVVJ04fJvUHgL8Ox459OeAp1DXKT+NQQJeca6PPe8vVADAaCPilh6nHiimZxQ22EPq+bcea7u4zYgRcgSPMfOmn1M7mQXrkQCHnlHRTviS0ctgRw+TMX/JY7h07lSzgy5Pard27TBcSTKJ0MiXshSZgepW4HOjH1Ho= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2017 01:44:57.3653 (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 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_ */