From patchwork Wed Jan 6 04:54:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 1423010 X-Patchwork-Delegate: daniel@makrotopia.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=zc7eWKuy; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Sasc8EzS; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D9x5b5vs5z9sVS for ; Thu, 7 Jan 2021 04:22:59 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Hyqyry1FQeiHjlSdy5kwym0rkCKGVOEiOKq8+R4CHK0=; b=zc7eWKuyekgYogD23RWTTdLJ4b kRJK+UYTni8yX5Z+2ffFeTFifOiDWGQGrp1YfJ2ljvJ2Avbco4MywkALagr/JLgjKunekH+1m2tlE Xm8Xpgdu1EFVnuB126YIrkKKxTURYnOSOXy0AyPIpEkLUV3EIxgqaKDZHqSDpLB0JfFWurqdBuU5w VOVq1+YGxnvrl/KHdeGA+bvrN4KV/LNzBHlJEmX6KMSxaMAyRTH81rJcRUk7c8R02zIebvRrCjfUP R02ylDWS4NM+/2BTI7+QuIbA9TI04s02bOM+H4SseQ5GmW/slY4szrnoY3C2oz9R+lHUpGTVWV0Zl DGZSKYwA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxCUc-0001z0-Te; Wed, 06 Jan 2021 17:21:06 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxCUZ-0001yD-Gm for openwrt-devel@lists.openwrt.org; Wed, 06 Jan 2021 17:21:04 +0000 Received: by mail-ej1-x633.google.com with SMTP id lt17so6101525ejb.3 for ; Wed, 06 Jan 2021 09:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JTXIQVwD8EvCoWfOI6vo3Bvk+VrZpye8jRqqEDnEjfk=; b=Sasc8EzS6fG8VcYQyQmPv7DoGXI5LhSePPvtCsFfyIogfqptetUVf8F/w6Jx31onXH Wo/A5u/174rkOUy7sKpSfwu2Ipv/U/I2WhUtWyJEXXLsS09JSMiWOFXY2tbPC/pE3Qzs ZrXi96vgVqsXt4i1jb1e3soE9O16cfjqpqZZHerd752NXCdUIm7CMABjqJJmePKTDzIp MIztKtD2jpRzpNQdFo/SvciCOtgyj4g2qB+u+OsDPo6DmCa1v701fszpVf+GWvuvWYhf RrrMF4NNStiJFlOiN4874AyO6o4CaX95dxsC04O5FBLdV9nhR0tAdh+OVBCL9soIs2Tz AtwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JTXIQVwD8EvCoWfOI6vo3Bvk+VrZpye8jRqqEDnEjfk=; b=qph+dbyLFNIgZpjmp34ApqVHEmCyCEFR3zEYKcq4ncPeAvYz2Qm/E35XVGd89N7EaU jn64ajN49MXBRVcWpQV+7Ht/d2+3BQ2Ew1EfH70hlRfsmvwPyeG7r2QHy3WiM33gve/S NVtMuutBMzNAjZsLil5dCAvYRrXtVzTmt9U0fZNx2KJ5cgg5d+DRvE3Xuxi57XwQ+KzK B6GIfHCfOcCDCppNCnH89vGt6ignVPdk4hNKOTxX0BgUN2HGt/LJEVWjOKzNe3QyXU+o juvia1GQ5ZSPFFP8O8DJSKxENMdvPhJ0rCAE9do46fYRu1BNFmDFdwaHd9t/wEHq4tlL SgUw== X-Gm-Message-State: AOAM530Qfk5WWLxk6b0twKk0EQfaJTv62dDiXnnngtyYSFTLvKOEu1sv wcK94zF4BQ9U6sHG8x3WfMV8aqzS85g= X-Google-Smtp-Source: ABdhPJxdRXijUJaBTiuOWIXJ6+CBqhjX763hlJDm2yc8w1+uY1qltltB3hdfZj7ZC0MLuoBswpj1Mg== X-Received: by 2002:a17:906:4c85:: with SMTP id q5mr3483192eju.375.1609953659121; Wed, 06 Jan 2021 09:20:59 -0800 (PST) Received: from ansuel-xps20.localdomain (host-87-3-254-254.retail.telecomitalia.it. [87.3.254.254]) by smtp.googlemail.com with ESMTPSA id r11sm1682842edt.58.2021.01.06.09.20.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jan 2021 09:20:58 -0800 (PST) From: Ansuel Smith To: openwrt-devel@lists.openwrt.org Subject: [IWINFO PATCH] iwinfo: set center chan unsupported for not-nl80211 driver Date: Wed, 6 Jan 2021 05:54:57 +0100 Message-Id: <20210106045457.19185-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210106_122103_637905_505B67BF X-CRM114-Status: GOOD ( 12.39 ) X-Spam-Score: 0.6 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.8 DATE_IN_PAST_12_24 Date: is 12 to 24 hours before Received: date -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ansuelsmth[at]gmail.com] -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:633 listed in] [list.dnswl.org] X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ansuel Smith Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Declare get_center_chan1 and get_center_chan2 not supported for not nl80211 driver. Signed-off-by: Ansuel Smith --- iwinfo_madwifi.c | 14 ++++++++++++++ iwinfo_wext.c | 14 ++++++++++++++ iwinfo_wl.c | 14 ++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/iwinfo_madwifi.c b/iwinfo_madwifi.c index f28bca1..d27e6c9 100644 --- a/iwinfo_madwifi.c +++ b/iwinfo_madwifi.c @@ -394,6 +394,18 @@ static int madwifi_get_channel(const char *ifname, int *buf) return -1; } +static int madwifi_get_center_chan1(const char *ifname, int *buf) +{ + /* Not Supported */ + return -1; +} + +static int madwifi_get_center_chan2(const char *ifname, int *buf) +{ + /* Not Supported */ + return -1; +} + static int madwifi_get_frequency(const char *ifname, int *buf) { struct iwreq wrq; @@ -1111,6 +1123,8 @@ const struct iwinfo_ops madwifi_ops = { .name = "madwifi", .probe = madwifi_probe, .channel = madwifi_get_channel, + .center_chan1 = madwifi_get_center_chan1, + .center_chan2 = madwifi_get_center_chan2, .frequency = madwifi_get_frequency, .frequency_offset = madwifi_get_frequency_offset, .txpower = madwifi_get_txpower, diff --git a/iwinfo_wext.c b/iwinfo_wext.c index ee02f3a..b68d230 100644 --- a/iwinfo_wext.c +++ b/iwinfo_wext.c @@ -185,6 +185,18 @@ static int wext_get_channel(const char *ifname, int *buf) return -1; } +static int wext_get_center_chan1(const char *ifname, int *buf) +{ + /* Not Supported */ + return -1; +} + +static int wext_get_center_chan2(const char *ifname, int *buf) +{ + /* Not Supported */ + return -1; +} + static int wext_get_frequency(const char *ifname, int *buf) { struct iwreq wrq; @@ -534,6 +546,8 @@ const struct iwinfo_ops wext_ops = { .name = "wext", .probe = wext_probe, .channel = wext_get_channel, + .center_chan1 = wext_get_center_chan1, + .center_chan2 = wext_get_center_chan2, .frequency = wext_get_frequency, .frequency_offset = wext_get_frequency_offset, .txpower = wext_get_txpower, diff --git a/iwinfo_wl.c b/iwinfo_wl.c index 80d3d7e..9ec78cd 100644 --- a/iwinfo_wl.c +++ b/iwinfo_wl.c @@ -144,6 +144,18 @@ static int wl_get_channel(const char *ifname, int *buf) return wl_ioctl(ifname, WLC_GET_CHANNEL, buf, sizeof(buf)); } +static int wl_get_center_chan1(const char *ifname, int *buf) +{ + /* Not Supported */ + return -1; +} + +static int wl_get_center_chan2(const char *ifname, int *buf) +{ + /* Not Supported */ + return -1; +} + static int wl_get_frequency(const char *ifname, int *buf) { return wext_ops.frequency(ifname, buf); @@ -734,6 +746,8 @@ const struct iwinfo_ops wl_ops = { .name = "wl", .probe = wl_probe, .channel = wl_get_channel, + .center_chan1 = wl_get_center_chan1, + .center_chan2 = wl_get_center_chan2, .frequency = wl_get_frequency, .frequency_offset = wl_get_frequency_offset, .txpower = wl_get_txpower,