summaryrefslogtreecommitdiff
path: root/batman-adv
diff options
context:
space:
mode:
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>2023-04-06 18:05:50 -0500
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2023-04-07 09:03:04 -0500
commit2eb71d7d7ab0b4b1dc762630fc7009c0f7266c9b (patch)
tree6dbd19cf474779b585ad88bce9ee3cc6e0ada9b2 /batman-adv
parent1b063f315eb5e6adfd4063f75ea40710f2131dc3 (diff)
batman-adv: fix compilation bug in batadv_is_cfg80211_netdev()
Because batman-adv is built under backports, not a clean linux tree, the CONFIG_CFG80211 does not exist. The evaluation of IS_ENABLED() in batadv_is_cfg80211_netdev() will be false, causing the funtion to always return false. This means that the wifi_flags of an interface don't get set, causing batadv_is_wifi_hardif() to always return false. As a result, batadv_v_elp_get_throughput() never tries to get the station info from cfg80211, resulting in the following warning: batman_adv: bat0: WiFi driver or ethtool info does not provide information about link speeds on interface phy1-mesh0, therefore defaulting to hardcoded throughput values of 1.0 Mbps. So replace CONFIG_CFG80211 with CPTCFG_CFG80211, which is the correct macro to use under backports. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'batman-adv')
-rw-r--r--batman-adv/patches/0005-fix-batadv_is_cfg80211_netdev.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/batman-adv/patches/0005-fix-batadv_is_cfg80211_netdev.patch b/batman-adv/patches/0005-fix-batadv_is_cfg80211_netdev.patch
new file mode 100644
index 0000000..9ac66b8
--- /dev/null
+++ b/batman-adv/patches/0005-fix-batadv_is_cfg80211_netdev.patch
@@ -0,0 +1,19 @@
+From: Alexandru Gagniuc <mr.nuke.me@gmail.com>
+Date: Thu, 6 Apr 2023 18:05:50 -0500
+Subject: fix batadv_is_cfg80211_netdev
+
+Replace CONFIG_CFG80211 with CPTCFG_CFG80211, which is the correct
+macro to use when building under backports.
+
+--- a/net/batman-adv/hard-interface.c
++++ b/net/batman-adv/hard-interface.c
+@@ -307,8 +307,7 @@ static bool batadv_is_cfg80211_netdev(st
+ {
+ if (!net_device)
+ return false;
+-
+-#if IS_ENABLED(CONFIG_CFG80211)
++#if IS_ENABLED(CPTCFG_CFG80211)
+ /* cfg80211 drivers have to set ieee80211_ptr */
+ if (net_device->ieee80211_ptr)
+ return true;