Merge tag 'wireless-drivers-next-for-davem-2016-09-15' of git://git.kernel.org/pub...
[cascardo/linux.git] / drivers / net / wireless / intel / iwlwifi / mvm / mvm.h
index 6a615bb..2e30990 100644 (file)
@@ -699,6 +699,10 @@ struct iwl_mvm_baid_data {
  *     it. In this state, when a new queue is needed to be allocated but no
  *     such free queue exists, an inactive queue might be freed and given to
  *     the new RA/TID.
+ * @IWL_MVM_QUEUE_RECONFIGURING: queue is being reconfigured
+ *     This is the state of a queue that has had traffic pass through it, but
+ *     needs to be reconfigured for some reason, e.g. the queue needs to
+ *     become unshared and aggregations re-enabled on.
  */
 enum iwl_mvm_queue_status {
        IWL_MVM_QUEUE_FREE,
@@ -706,10 +710,11 @@ enum iwl_mvm_queue_status {
        IWL_MVM_QUEUE_READY,
        IWL_MVM_QUEUE_SHARED,
        IWL_MVM_QUEUE_INACTIVE,
+       IWL_MVM_QUEUE_RECONFIGURING,
 };
 
 #define IWL_MVM_DQA_QUEUE_TIMEOUT      (5 * HZ)
-#define IWL_MVM_NUM_CIPHERS             8
+#define IWL_MVM_NUM_CIPHERS             10
 
 struct iwl_mvm {
        /* for logger access */
@@ -769,6 +774,7 @@ struct iwl_mvm {
                u8 ra_sta_id; /* The RA this queue is mapped to, if exists */
                bool reserved; /* Is this the TXQ reserved for a STA */
                u8 mac80211_ac; /* The mac80211 AC this queue is mapped to */
+               u8 txq_tid; /* The TID "owner" of this queue*/
                u16 tid_bitmap; /* Bitmap of the TIDs mapped to this queue */
                /* Timestamp for inactivation per TID of this queue */
                unsigned long last_frame_time[IWL_MAX_TID_COUNT + 1];
@@ -1124,6 +1130,18 @@ static inline bool iwl_mvm_enter_d0i3_on_suspend(struct iwl_mvm *mvm)
                (mvm->trans->runtime_pm_mode != IWL_PLAT_PM_MODE_D0I3);
 }
 
+static inline bool iwl_mvm_is_dqa_data_queue(struct iwl_mvm *mvm, u8 queue)
+{
+       return (queue >= IWL_MVM_DQA_MIN_DATA_QUEUE) &&
+              (queue <= IWL_MVM_DQA_MAX_DATA_QUEUE);
+}
+
+static inline bool iwl_mvm_is_dqa_mgmt_queue(struct iwl_mvm *mvm, u8 queue)
+{
+       return (queue >= IWL_MVM_DQA_MIN_MGMT_QUEUE) &&
+              (queue <= IWL_MVM_DQA_MAX_MGMT_QUEUE);
+}
+
 static inline bool iwl_mvm_is_lar_supported(struct iwl_mvm *mvm)
 {
        bool nvm_lar = mvm->nvm_data->lar_enabled;
@@ -1194,6 +1212,12 @@ static inline bool iwl_mvm_has_new_rx_api(struct iwl_mvm *mvm)
                           IWL_UCODE_TLV_CAPA_MULTI_QUEUE_RX_SUPPORT);
 }
 
+static inline bool iwl_mvm_has_new_tx_api(struct iwl_mvm *mvm)
+{
+       /* TODO - replace with TLV once defined */
+       return mvm->trans->cfg->use_tfh;
+}
+
 static inline bool iwl_mvm_is_tt_in_fw(struct iwl_mvm *mvm)
 {
 #ifdef CONFIG_THERMAL