summaryrefslogtreecommitdiff
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2020-01-31 13:12:46 +0200
committerJohannes Berg <johannes.berg@intel.com>2020-02-07 12:40:20 +0100
commit07b83d2ecd2f812c32d1f852f853375f50e1ccf2 (patch)
tree3f6eef3041c3e88416be298ff55a01eedd930418 /net/mac80211/iface.c
parentb5db1acab19b99da5b30042133734b01f65b5900 (diff)
mac80211: allow changing TX-related netdev features
Set ndev->hw_features as well as ndev->features to allow changing the TX-related features with ethtool. We cannot (yet) change RX-related features since that requires telling the driver about it and we have no API for that yet. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/20200131111300.891737-10-luca@coelho.fi Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 9b833e170c20..99d913a6e651 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -8,7 +8,7 @@
* Copyright 2008, Johannes Berg <johannes@sipsolutions.net>
* Copyright 2013-2014 Intel Mobile Communications GmbH
* Copyright (c) 2016 Intel Deutschland GmbH
- * Copyright (C) 2018 Intel Corporation
+ * Copyright (C) 2018-2019 Intel Corporation
*/
#include <linux/slab.h>
#include <linux/kernel.h>
@@ -1938,6 +1938,8 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
sdata->u.mgd.use_4addr = params->use_4addr;
ndev->features |= local->hw.netdev_features;
+ ndev->hw_features |= ndev->features &
+ MAC80211_SUPPORTED_FEATURES_TX;
netdev_set_default_ethtool_ops(ndev, &ieee80211_ethtool_ops);