summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnsuel Smith <ansuelsmth@gmail.com>2021-01-06 05:54:57 +0100
committerDaniel Golle <daniel@makrotopia.org>2021-01-06 17:38:07 +0000
commit51c1336e7a408f539fa752dd80496e9f248c21e3 (patch)
treee6a81595dd3f2736a6debceca69b2ab4d15d7857
parent0702f322949bb276ae42b77c8c0cd89d8a5d0318 (diff)
downloadiwinfo-51c1336e7a408f539fa752dd80496e9f248c21e3.tar.gz
iwinfo: set center chan unsupported for not-nl80211 driver
Declare get_center_chan1 and get_center_chan2 not supported for not nl80211 driver. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
-rw-r--r--iwinfo_madwifi.c14
-rw-r--r--iwinfo_wext.c14
-rw-r--r--iwinfo_wl.c14
3 files changed, 42 insertions, 0 deletions
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,