Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Contains all definitions needed for the Libertas' MESH implementation.
0004  */
0005 #ifndef _LBS_MESH_H_
0006 #define _LBS_MESH_H_
0007 
0008 
0009 #include <net/iw_handler.h>
0010 #include <net/lib80211.h>
0011 
0012 #include "host.h"
0013 #include "dev.h"
0014 
0015 #ifdef CONFIG_LIBERTAS_MESH
0016 
0017 struct net_device;
0018 
0019 void lbs_init_mesh(struct lbs_private *priv);
0020 void lbs_start_mesh(struct lbs_private *priv);
0021 int lbs_deinit_mesh(struct lbs_private *priv);
0022 
0023 void lbs_remove_mesh(struct lbs_private *priv);
0024 
0025 static inline bool lbs_mesh_activated(struct lbs_private *priv)
0026 {
0027     return !!priv->mesh_tlv;
0028 }
0029 
0030 int lbs_mesh_set_channel(struct lbs_private *priv, u8 channel);
0031 
0032 /* Sending / Receiving */
0033 
0034 struct rxpd;
0035 struct txpd;
0036 
0037 struct net_device *lbs_mesh_set_dev(struct lbs_private *priv,
0038     struct net_device *dev, struct rxpd *rxpd);
0039 void lbs_mesh_set_txpd(struct lbs_private *priv,
0040     struct net_device *dev, struct txpd *txpd);
0041 
0042 
0043 /* Command handling */
0044 
0045 struct cmd_ds_command;
0046 struct cmd_ds_mesh_access;
0047 struct cmd_ds_mesh_config;
0048 
0049 
0050 /* Ethtool statistics */
0051 
0052 struct ethtool_stats;
0053 
0054 void lbs_mesh_ethtool_get_stats(struct net_device *dev,
0055     struct ethtool_stats *stats, uint64_t *data);
0056 int lbs_mesh_ethtool_get_sset_count(struct net_device *dev, int sset);
0057 void lbs_mesh_ethtool_get_strings(struct net_device *dev,
0058     uint32_t stringset, uint8_t *s);
0059 
0060 
0061 #else
0062 
0063 #define lbs_init_mesh(priv) do { } while (0)
0064 #define lbs_deinit_mesh(priv)   do { } while (0)
0065 #define lbs_start_mesh(priv)    do { } while (0)
0066 #define lbs_add_mesh(priv)  do { } while (0)
0067 #define lbs_remove_mesh(priv)   do { } while (0)
0068 #define lbs_mesh_set_dev(priv, dev, rxpd) (dev)
0069 #define lbs_mesh_set_txpd(priv, dev, txpd) do { } while (0)
0070 #define lbs_mesh_set_channel(priv, channel) (0)
0071 #define lbs_mesh_activated(priv) (false)
0072 
0073 #endif
0074 
0075 
0076 
0077 #endif