iwinfo: set center chan unsupported for not-nl80211 driver
authorAnsuel Smith <ansuelsmth@gmail.com>
Wed, 6 Jan 2021 04:54:57 +0000 (05:54 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 6 Jan 2021 17:38:07 +0000 (17:38 +0000)
Declare get_center_chan1 and get_center_chan2 not supported for not
nl80211 driver.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
iwinfo_madwifi.c
iwinfo_wext.c
iwinfo_wl.c

index f28bca14dd99daa68017ffbf792b53d5c7a280f6..d27e6c92e05092c5e7103cc0f4f063ab9375e444 100644 (file)
@@ -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,
index ee02f3a71618e9a6975617ce7174d32ec4899646..b68d23013c8e2690e6fbcdad27375e7d72c38c61 100644 (file)
@@ -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,
index 80d3d7eec3e0fc8c077453a67d16832dd32ec705..9ec78cd2119f48934493610c50691401fc55bfef 100644 (file)
@@ -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,