]> err.no Git - linux-2.6/blobdiff - include/net/cfg80211.h
[SPARC]: Merge asm-sparc{,64}/bugs.h
[linux-2.6] / include / net / cfg80211.h
index 3db7dfa53b6f5b9ccd4a7d07a8d15f7616105c65..bcc480b8892aba4c9ce19bcc3e0fc825ff839c07 100644 (file)
@@ -69,6 +69,100 @@ struct key_params {
        u32 cipher;
 };
 
+/**
+ * struct beacon_parameters - beacon parameters
+ *
+ * Used to configure the beacon for an interface.
+ *
+ * @head: head portion of beacon (before TIM IE)
+ *     or %NULL if not changed
+ * @tail: tail portion of beacon (after TIM IE)
+ *     or %NULL if not changed
+ * @interval: beacon interval or zero if not changed
+ * @dtim_period: DTIM period or zero if not changed
+ * @head_len: length of @head
+ * @tail_len: length of @tail
+ */
+struct beacon_parameters {
+       u8 *head, *tail;
+       int interval, dtim_period;
+       int head_len, tail_len;
+};
+
+/**
+ * enum station_flags - station flags
+ *
+ * Station capability flags. Note that these must be the bits
+ * according to the nl80211 flags.
+ *
+ * @STATION_FLAG_CHANGED: station flags were changed
+ * @STATION_FLAG_AUTHORIZED: station is authorized to send frames (802.1X)
+ * @STATION_FLAG_SHORT_PREAMBLE: station is capable of receiving frames
+ *     with short preambles
+ * @STATION_FLAG_WME: station is WME/QoS capable
+ */
+enum station_flags {
+       STATION_FLAG_CHANGED            = 1<<0,
+       STATION_FLAG_AUTHORIZED         = 1<<NL80211_STA_FLAG_AUTHORIZED,
+       STATION_FLAG_SHORT_PREAMBLE     = 1<<NL80211_STA_FLAG_SHORT_PREAMBLE,
+       STATION_FLAG_WME                = 1<<NL80211_STA_FLAG_WME,
+};
+
+/**
+ * struct station_parameters - station parameters
+ *
+ * Used to change and create a new station.
+ *
+ * @vlan: vlan interface station should belong to
+ * @supported_rates: supported rates in IEEE 802.11 format
+ *     (or NULL for no change)
+ * @supported_rates_len: number of supported rates
+ * @station_flags: station flags (see &enum station_flags)
+ * @listen_interval: listen interval or -1 for no change
+ * @aid: AID or zero for no change
+ */
+struct station_parameters {
+       u8 *supported_rates;
+       struct net_device *vlan;
+       u32 station_flags;
+       int listen_interval;
+       u16 aid;
+       u8 supported_rates_len;
+};
+
+/**
+ * enum station_stats_flags - station statistics flags
+ *
+ * Used by the driver to indicate which info in &struct station_stats
+ * it has filled in during get_station().
+ *
+ * @STATION_STAT_INACTIVE_TIME: @inactive_time filled
+ * @STATION_STAT_RX_BYTES: @rx_bytes filled
+ * @STATION_STAT_TX_BYTES: @tx_bytes filled
+ */
+enum station_stats_flags {
+       STATION_STAT_INACTIVE_TIME      = 1<<0,
+       STATION_STAT_RX_BYTES           = 1<<1,
+       STATION_STAT_TX_BYTES           = 1<<2,
+};
+
+/**
+ * struct station_stats - station statistics
+ *
+ * Station information filled by driver for get_station().
+ *
+ * @filled: bitflag of flags from &enum station_stats_flags
+ * @inactive_time: time since last station activity (tx/rx) in milliseconds
+ * @rx_bytes: bytes received from this station
+ * @tx_bytes: bytes transmitted to this station
+ */
+struct station_stats {
+       u32 filled;
+       u32 inactive_time;
+       u32 rx_bytes;
+       u32 tx_bytes;
+};
+
 /* from net/wireless.h */
 struct wiphy;
 
@@ -103,6 +197,19 @@ struct wiphy;
  *     and @key_index
  *
  * @set_default_key: set the default key on an interface
+ *
+ * @add_beacon: Add a beacon with given parameters, @head, @interval
+ *     and @dtim_period will be valid, @tail is optional.
+ * @set_beacon: Change the beacon parameters for an access point mode
+ *     interface. This should reject the call when no beacon has been
+ *     configured.
+ * @del_beacon: Remove beacon configuration and stop sending the beacon.
+ *
+ * @add_station: Add a new station.
+ *
+ * @del_station: Remove a station; @mac may be NULL to remove all stations.
+ *
+ * @change_station: Modify a given station.
  */
 struct cfg80211_ops {
        int     (*add_virtual_intf)(struct wiphy *wiphy, char *name,
@@ -122,6 +229,22 @@ struct cfg80211_ops {
        int     (*set_default_key)(struct wiphy *wiphy,
                                   struct net_device *netdev,
                                   u8 key_index);
+
+       int     (*add_beacon)(struct wiphy *wiphy, struct net_device *dev,
+                             struct beacon_parameters *info);
+       int     (*set_beacon)(struct wiphy *wiphy, struct net_device *dev,
+                             struct beacon_parameters *info);
+       int     (*del_beacon)(struct wiphy *wiphy, struct net_device *dev);
+
+
+       int     (*add_station)(struct wiphy *wiphy, struct net_device *dev,
+                              u8 *mac, struct station_parameters *params);
+       int     (*del_station)(struct wiphy *wiphy, struct net_device *dev,
+                              u8 *mac);
+       int     (*change_station)(struct wiphy *wiphy, struct net_device *dev,
+                                 u8 *mac, struct station_parameters *params);
+       int     (*get_station)(struct wiphy *wiphy, struct net_device *dev,
+                              u8 *mac, struct station_stats *stats);
 };
 
 #endif /* __NET_CFG80211_H */