Search Linux Wireless

[PATCH 2/2] mac80211: allow low-level drivers to set netdev feature bits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Allow low-level drivers to change the feature bit for a vif's underlying
net_device struct.

Signed-off-by: Arik Nemtsov <arik@xxxxxxxxxx>
---
 include/net/mac80211.h |   10 ++++++++++
 net/mac80211/tx.c      |    9 +++++++++
 2 files changed, 19 insertions(+)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 4d6e6c6..acc46b2 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2992,6 +2992,16 @@ struct sk_buff *
 ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
 
 /**
+ * ieee80211_set_netdev_features - set netdev feature bits for vif
+ * @vif: virtual interface to set netdev flags on
+ * @features: feature bits (see &struct net_device for details)
+ *
+ * This function sets netdev feature bit for the device associated with the
+ * specified vif.
+ */
+void ieee80211_set_netdev_features(struct ieee80211_vif *vif, int features);
+
+/**
  * ieee80211_get_tkip_p1k_iv - get a TKIP phase 1 key for IV32
  *
  * This function returns the TKIP phase 1 key for the given IV32.
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index d67d36f..d9f94a6 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2754,3 +2754,12 @@ void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata,
 	ieee80211_xmit(sdata, skb);
 	local_bh_enable();
 }
+
+void ieee80211_set_netdev_features(struct ieee80211_vif *vif, int features)
+{
+	struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+
+	if (sdata->dev)
+		sdata->dev->features |= features;
+}
+EXPORT_SYMBOL(ieee80211_set_netdev_features);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux