]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/mac80211.h
mac80211: remove queue info from ieee80211_tx_status
[linux-2.6-omap-h63xx.git] / include / net / mac80211.h
index 4a80d74975e843d6fed5511a477c009ed9b1667e..ef701d6fd66a7fc05fe7c16b8df60654c553b2f4 100644 (file)
@@ -117,13 +117,13 @@ struct ieee80211_tx_queue_params {
 };
 
 /**
- * struct ieee80211_tx_queue_stats_data - transmit queue statistics
+ * struct ieee80211_tx_queue_stats - transmit queue statistics
  *
  * @len: number of packets in queue
  * @limit: queue length limit
  * @count: number of frames sent
  */
-struct ieee80211_tx_queue_stats_data {
+struct ieee80211_tx_queue_stats {
        unsigned int len;
        unsigned int limit;
        unsigned int count;
@@ -165,10 +165,6 @@ enum ieee80211_tx_queue {
        NUM_TX_DATA_QUEUES_AMPDU = 16
 };
 
-struct ieee80211_tx_queue_stats {
-       struct ieee80211_tx_queue_stats_data data[NUM_TX_DATA_QUEUES_AMPDU];
-};
-
 struct ieee80211_low_level_stats {
        unsigned int dot11ACKFailureCount;
        unsigned int dot11RTSFailureCount;
@@ -286,8 +282,17 @@ enum mac80211_tx_control_flags {
 
 /* Transmit control fields. This data structure is passed to low-level driver
  * with each TX frame. The low-level driver is responsible for configuring
- * the hardware to use given values (depending on what is supported). */
-
+ * the hardware to use given values (depending on what is supported).
+ *
+ * NOTE: Be careful with using the pointers outside of the ieee80211_ops->tx()
+ * context (i.e. when defering the work to a workqueue).
+ * The vif pointer is valid until the it has been removed with the
+ * ieee80211_ops->remove_interface() callback funtion.
+ * The hw_key pointer is valid until it has been removed with the
+ * ieee80211_ops->set_key() callback function.
+ * The tx_rate and alt_retry_rate pointers are valid until the phy is
+ * deregistered.
+ */
 struct ieee80211_tx_control {
        struct ieee80211_vif *vif;
        struct ieee80211_rate *tx_rate;
@@ -298,9 +303,11 @@ struct ieee80211_tx_control {
        /* retry rate for the last retries */
        struct ieee80211_rate *alt_retry_rate;
 
+       /* Key used for hardware encryption
+        * NULL if IEEE80211_TXCTL_DO_NOT_ENCRYPT is set */
+       struct ieee80211_key_conf *hw_key;
+
        u32 flags;              /* tx control flags defined above */
-       u8 key_idx;             /* keyidx from hw->set_key(), undefined if
-                                * IEEE80211_TXCTL_DO_NOT_ENCRYPT is set */
        u8 retry_limit;         /* 1 = only first attempt, 2 = one retry, ..
                                 * This could be used when set_retry_limit
                                 * is not implemented by the driver */
@@ -410,8 +417,6 @@ enum ieee80211_tx_status_flags {
  * @ampdu_ack_map: block ack bit map for the aggregation.
  *     relevant only if IEEE80211_TX_STATUS_AMPDU was set.
  * @ack_signal: signal strength of the ACK frame
- * @queue_length: ?? REMOVE
- * @queue_number: ?? REMOVE
  */
 struct ieee80211_tx_status {
        struct ieee80211_tx_control control;
@@ -421,8 +426,6 @@ struct ieee80211_tx_status {
        u8 ampdu_ack_len;
        u64 ampdu_ack_map;
        int ack_signal;
-       int queue_length;
-       int queue_number;
 };
 
 /**
@@ -610,11 +613,14 @@ enum ieee80211_key_alg {
  * @IEEE80211_KEY_FLAG_GENERATE_MMIC: This flag should be set by
  *     the driver for a TKIP key if it requires Michael MIC
  *     generation in software.
+ * @IEEE80211_KEY_FLAG_PAIRWISE: Set by mac80211, this flag indicates
+ *     that the key is pairwise rather then a shared key.
  */
 enum ieee80211_key_flags {
        IEEE80211_KEY_FLAG_WMM_STA      = 1<<0,
        IEEE80211_KEY_FLAG_GENERATE_IV  = 1<<1,
        IEEE80211_KEY_FLAG_GENERATE_MMIC= 1<<2,
+       IEEE80211_KEY_FLAG_PAIRWISE     = 1<<3,
 };
 
 /**
@@ -1069,9 +1075,8 @@ enum ieee80211_ampdu_mlme_action {
  * @get_tx_stats: Get statistics of the current TX queue status. This is used
  *     to get number of currently queued packets (queue length), maximum queue
  *     size (limit), and total number of packets sent using each TX queue
- *     (count). This information is used for WMM to find out which TX
- *     queues have room for more packets and by hostapd to provide
- *     statistics about the current queueing state to external programs.
+ *     (count). The 'stats' pointer points to an array that has hw->queues +
+ *     hw->ampdu_queues items.
  *
  * @get_tsf: Get the current TSF timer value from firmware/hardware. Currently,
  *     this is only used for IBSS mode debugging and, as such, is not a