diff mbox series

[RFC,v1,236/256] cl8k: add vif.h

Message ID 20210617160223.160998-237-viktor.barna@celeno.com
State New
Headers show
Series wireless: cl8k driver for Celeno IEEE 802.11ax devices | expand

Commit Message

Viktor Barna June 17, 2021, 4:02 p.m. UTC
From: Viktor Barna <viktor.barna@celeno.com>

(Part of the split. Please, take a look at the cover letter for more
details).

Signed-off-by: Viktor Barna <viktor.barna@celeno.com>
---
 drivers/net/wireless/celeno/cl8k/vif.h | 44 ++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 drivers/net/wireless/celeno/cl8k/vif.h

--
2.30.0
diff mbox series

Patch

diff --git a/drivers/net/wireless/celeno/cl8k/vif.h b/drivers/net/wireless/celeno/cl8k/vif.h
new file mode 100644
index 000000000000..2cfd027ee88c
--- /dev/null
+++ b/drivers/net/wireless/celeno/cl8k/vif.h
@@ -0,0 +1,44 @@ 
+/* SPDX-License-Identifier: MIT */
+/* Copyright(c) 2019-2021, Celeno Communications Ltd. */
+
+#ifndef CL_VIF_H
+#define CL_VIF_H
+
+#include "wrs/wrs_db.h"
+#include <linux/netdevice.h>
+
+/*
+ * Structure used to save information relative to the managed interfaces.
+ * Will be used as the 'drv_priv' field of the "struct ieee80211_vif" structure.
+ * This is also linked within the cl_hw vifs list.
+ */
+struct cl_vif {
+       struct list_head list;
+       struct cl_hw *cl_hw;
+       struct ieee80211_vif *vif;
+       struct net_device *dev;
+       struct net_device_ops dev_ops;
+       struct ieee80211_key_conf *key_conf;
+       const struct net_device_ops *orig_dev_ops;
+       u16 sequence_number;
+       u8 num_sta; /* Number of station connected per SSID */
+       u8 vif_index;
+       bool tx_en;
+       struct mcast_table *mcast_table;
+};
+
+void cl_vif_init(struct cl_hw *cl_hw);
+void cl_vif_add(struct cl_hw *cl_hw, struct cl_vif *cl_vif);
+void cl_vif_remove(struct cl_hw *cl_hw, struct cl_vif *cl_vif);
+struct cl_vif *cl_vif_get_next(struct cl_hw *cl_hw, struct cl_vif *cl_vif);
+struct cl_vif *cl_vif_get_by_dev(struct cl_hw *cl_hw, struct net_device *dev);
+struct cl_vif *cl_vif_get_by_mac(struct cl_hw *cl_hw, u8 *mac_addr);
+struct cl_vif *cl_vif_get_first(struct cl_hw *cl_hw);
+struct cl_vif *cl_vif_get_first_ap(struct cl_hw *cl_hw);
+struct net_device *cl_vif_get_first_net_device(struct cl_hw *cl_hw);
+struct net_device *cl_vif_get_dev_by_index(struct cl_hw *cl_hw, u8 index);
+bool cl_vif_find_mac(struct cl_hw *cl_hw, u8 *mac_addr);
+void cl_vif_ap_tx_enable(struct cl_hw *cl_hw, bool enable);
+void cl_vif_bring_all_interfaces_down(struct cl_hw *cl_hw);
+
+#endif /* CL_VIF_H */