iwlwifi: mvm: use defines for SCD_CONFIG_CMD enablement
[cascardo/linux.git] / drivers / net / wireless / intel / iwlwifi / mvm / utils.c
index 423efab..7c138fe 100644 (file)
@@ -610,7 +610,7 @@ int iwl_mvm_reconfig_scd(struct iwl_mvm *mvm, int queue, int fifo, int sta_id,
 {
        struct iwl_scd_txq_cfg_cmd cmd = {
                .scd_queue = queue,
-               .enable = 1,
+               .action = SCD_CFG_ENABLE_QUEUE,
                .window = frame_limit,
                .sta_id = sta_id,
                .ssn = cpu_to_le16(ssn),
@@ -684,7 +684,7 @@ void iwl_mvm_enable_txq(struct iwl_mvm *mvm, int queue, int mac80211_queue,
        if (enable_queue) {
                struct iwl_scd_txq_cfg_cmd cmd = {
                        .scd_queue = queue,
-                       .enable = 1,
+                       .action = SCD_CFG_ENABLE_QUEUE,
                        .window = cfg->frame_limit,
                        .sta_id = cfg->sta_id,
                        .ssn = cpu_to_le16(ssn),
@@ -711,7 +711,7 @@ void iwl_mvm_disable_txq(struct iwl_mvm *mvm, int queue, int mac80211_queue,
 {
        struct iwl_scd_txq_cfg_cmd cmd = {
                .scd_queue = queue,
-               .enable = 0,
+               .action = SCD_CFG_DISABLE_QUEUE,
        };
        bool remove_mac_queue = true;
        int ret;
@@ -746,8 +746,9 @@ void iwl_mvm_disable_txq(struct iwl_mvm *mvm, int queue, int mac80211_queue,
                        ~BIT(mac80211_queue);
        mvm->queue_info[queue].hw_queue_refcount--;
 
-       cmd.enable = mvm->queue_info[queue].hw_queue_refcount ? 1 : 0;
-       if (!cmd.enable)
+       cmd.action = mvm->queue_info[queue].hw_queue_refcount ?
+               SCD_CFG_ENABLE_QUEUE : SCD_CFG_DISABLE_QUEUE;
+       if (cmd.action == SCD_CFG_DISABLE_QUEUE)
                mvm->queue_info[queue].status = IWL_MVM_QUEUE_FREE;
 
        IWL_DEBUG_TX_QUEUES(mvm,
@@ -757,7 +758,7 @@ void iwl_mvm_disable_txq(struct iwl_mvm *mvm, int queue, int mac80211_queue,
                            mvm->queue_info[queue].hw_queue_to_mac80211);
 
        /* If the queue is still enabled - nothing left to do in this func */
-       if (cmd.enable) {
+       if (cmd.action == SCD_CFG_ENABLE_QUEUE) {
                spin_unlock_bh(&mvm->queue_info_lock);
                return;
        }