wifi: iwlwifi: modify new queue allocation command
Follow a new firmware API changes and update the queue allocation command in the remove/modify cases to take the station mask and TID instead of the queue ID. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20221205102808.2925b38d3929.Ib8467711590c1969817c3321509eb131f4230e15@changeid
This commit is contained in:
parent
8ca67e3d8b
commit
c5a976cf6a
@ -382,9 +382,11 @@ enum iwl_scd_queue_cfg_operation {
|
|||||||
* @u.add.cb_size: size code
|
* @u.add.cb_size: size code
|
||||||
* @u.add.bc_dram_addr: byte-count table IOVA
|
* @u.add.bc_dram_addr: byte-count table IOVA
|
||||||
* @u.add.tfdq_dram_addr: TFD queue IOVA
|
* @u.add.tfdq_dram_addr: TFD queue IOVA
|
||||||
* @u.remove.queue: queue ID for removal
|
* @u.remove.sta_mask: station mask of queue to remove
|
||||||
* @u.modify.sta_mask: new station mask for modify
|
* @u.remove.tid: TID of queue to remove
|
||||||
* @u.modify.queue: queue ID to modify
|
* @u.modify.old_sta_mask: old station mask for modify
|
||||||
|
* @u.modify.tid: TID of queue to modify
|
||||||
|
* @u.modify.new_sta_mask: new station mask for modify
|
||||||
*/
|
*/
|
||||||
struct iwl_scd_queue_cfg_cmd {
|
struct iwl_scd_queue_cfg_cmd {
|
||||||
__le32 operation;
|
__le32 operation;
|
||||||
@ -399,11 +401,13 @@ struct iwl_scd_queue_cfg_cmd {
|
|||||||
__le64 tfdq_dram_addr;
|
__le64 tfdq_dram_addr;
|
||||||
} __packed add; /* TX_QUEUE_CFG_CMD_ADD_API_S_VER_1 */
|
} __packed add; /* TX_QUEUE_CFG_CMD_ADD_API_S_VER_1 */
|
||||||
struct {
|
struct {
|
||||||
__le32 queue;
|
__le32 sta_mask;
|
||||||
|
__le32 tid;
|
||||||
} __packed remove; /* TX_QUEUE_CFG_CMD_REMOVE_API_S_VER_1 */
|
} __packed remove; /* TX_QUEUE_CFG_CMD_REMOVE_API_S_VER_1 */
|
||||||
struct {
|
struct {
|
||||||
__le32 sta_mask;
|
__le32 old_sta_mask;
|
||||||
__le32 queue;
|
__le32 tid;
|
||||||
|
__le32 new_sta_mask;
|
||||||
} __packed modify; /* TX_QUEUE_CFG_CMD_MODIFY_API_S_VER_1 */
|
} __packed modify; /* TX_QUEUE_CFG_CMD_MODIFY_API_S_VER_1 */
|
||||||
} __packed u; /* TX_QUEUE_CFG_CMD_OPERATION_API_U_VER_1 */
|
} __packed u; /* TX_QUEUE_CFG_CMD_OPERATION_API_U_VER_1 */
|
||||||
} __packed; /* TX_QUEUE_CFG_CMD_API_S_VER_3 */
|
} __packed; /* TX_QUEUE_CFG_CMD_API_S_VER_3 */
|
||||||
|
@ -316,7 +316,7 @@ static int iwl_mvm_invalidate_sta_queue(struct iwl_mvm *mvm, int queue,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int iwl_mvm_disable_txq(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
static int iwl_mvm_disable_txq(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
||||||
u16 *queueptr, u8 tid)
|
int sta_id, u16 *queueptr, u8 tid)
|
||||||
{
|
{
|
||||||
int queue = *queueptr;
|
int queue = *queueptr;
|
||||||
struct iwl_scd_txq_cfg_cmd cmd = {
|
struct iwl_scd_txq_cfg_cmd cmd = {
|
||||||
@ -333,7 +333,8 @@ static int iwl_mvm_disable_txq(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
|||||||
SCD_QUEUE_CONFIG_CMD);
|
SCD_QUEUE_CONFIG_CMD);
|
||||||
struct iwl_scd_queue_cfg_cmd remove_cmd = {
|
struct iwl_scd_queue_cfg_cmd remove_cmd = {
|
||||||
.operation = cpu_to_le32(IWL_SCD_QUEUE_REMOVE),
|
.operation = cpu_to_le32(IWL_SCD_QUEUE_REMOVE),
|
||||||
.u.remove.queue = cpu_to_le32(queue),
|
.u.remove.tid = cpu_to_le32(tid),
|
||||||
|
.u.remove.sta_mask = cpu_to_le32(BIT(sta_id)),
|
||||||
};
|
};
|
||||||
|
|
||||||
ret = iwl_mvm_send_cmd_pdu(mvm, cmd_id, 0,
|
ret = iwl_mvm_send_cmd_pdu(mvm, cmd_id, 0,
|
||||||
@ -531,7 +532,7 @@ static int iwl_mvm_free_inactive_queue(struct iwl_mvm *mvm, int queue,
|
|||||||
iwl_mvm_invalidate_sta_queue(mvm, queue,
|
iwl_mvm_invalidate_sta_queue(mvm, queue,
|
||||||
disable_agg_tids, false);
|
disable_agg_tids, false);
|
||||||
|
|
||||||
ret = iwl_mvm_disable_txq(mvm, old_sta, &queue_tmp, tid);
|
ret = iwl_mvm_disable_txq(mvm, old_sta, sta_id, &queue_tmp, tid);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
IWL_ERR(mvm,
|
IWL_ERR(mvm,
|
||||||
"Failed to free inactive queue %d (ret=%d)\n",
|
"Failed to free inactive queue %d (ret=%d)\n",
|
||||||
@ -1408,7 +1409,7 @@ static int iwl_mvm_sta_alloc_queue(struct iwl_mvm *mvm,
|
|||||||
|
|
||||||
out_err:
|
out_err:
|
||||||
queue_tmp = queue;
|
queue_tmp = queue;
|
||||||
iwl_mvm_disable_txq(mvm, sta, &queue_tmp, tid);
|
iwl_mvm_disable_txq(mvm, sta, mvmsta->sta_id, &queue_tmp, tid);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1854,7 +1855,8 @@ static void iwl_mvm_disable_sta_queues(struct iwl_mvm *mvm,
|
|||||||
if (mvm_sta->tid_data[i].txq_id == IWL_MVM_INVALID_QUEUE)
|
if (mvm_sta->tid_data[i].txq_id == IWL_MVM_INVALID_QUEUE)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
iwl_mvm_disable_txq(mvm, sta, &mvm_sta->tid_data[i].txq_id, i);
|
iwl_mvm_disable_txq(mvm, sta, mvm_sta->sta_id,
|
||||||
|
&mvm_sta->tid_data[i].txq_id, i);
|
||||||
mvm_sta->tid_data[i].txq_id = IWL_MVM_INVALID_QUEUE;
|
mvm_sta->tid_data[i].txq_id = IWL_MVM_INVALID_QUEUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2065,7 +2067,7 @@ static int iwl_mvm_add_int_sta_with_queue(struct iwl_mvm *mvm, int macidx,
|
|||||||
ret = iwl_mvm_add_int_sta_common(mvm, sta, addr, macidx, maccolor);
|
ret = iwl_mvm_add_int_sta_common(mvm, sta, addr, macidx, maccolor);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if (!iwl_mvm_has_new_tx_api(mvm))
|
if (!iwl_mvm_has_new_tx_api(mvm))
|
||||||
iwl_mvm_disable_txq(mvm, NULL, queue,
|
iwl_mvm_disable_txq(mvm, NULL, sta->sta_id, queue,
|
||||||
IWL_MAX_TID_COUNT);
|
IWL_MAX_TID_COUNT);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2138,7 +2140,8 @@ int iwl_mvm_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
|||||||
if (WARN_ON_ONCE(mvm->snif_sta.sta_id == IWL_MVM_INVALID_STA))
|
if (WARN_ON_ONCE(mvm->snif_sta.sta_id == IWL_MVM_INVALID_STA))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
iwl_mvm_disable_txq(mvm, NULL, &mvm->snif_queue, IWL_MAX_TID_COUNT);
|
iwl_mvm_disable_txq(mvm, NULL, mvm->snif_sta.sta_id,
|
||||||
|
&mvm->snif_queue, IWL_MAX_TID_COUNT);
|
||||||
ret = iwl_mvm_rm_sta_common(mvm, mvm->snif_sta.sta_id);
|
ret = iwl_mvm_rm_sta_common(mvm, mvm->snif_sta.sta_id);
|
||||||
if (ret)
|
if (ret)
|
||||||
IWL_WARN(mvm, "Failed sending remove station\n");
|
IWL_WARN(mvm, "Failed sending remove station\n");
|
||||||
@ -2155,7 +2158,8 @@ int iwl_mvm_rm_aux_sta(struct iwl_mvm *mvm)
|
|||||||
if (WARN_ON_ONCE(mvm->aux_sta.sta_id == IWL_MVM_INVALID_STA))
|
if (WARN_ON_ONCE(mvm->aux_sta.sta_id == IWL_MVM_INVALID_STA))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
iwl_mvm_disable_txq(mvm, NULL, &mvm->aux_queue, IWL_MAX_TID_COUNT);
|
iwl_mvm_disable_txq(mvm, NULL, mvm->aux_sta.sta_id,
|
||||||
|
&mvm->aux_queue, IWL_MAX_TID_COUNT);
|
||||||
ret = iwl_mvm_rm_sta_common(mvm, mvm->aux_sta.sta_id);
|
ret = iwl_mvm_rm_sta_common(mvm, mvm->aux_sta.sta_id);
|
||||||
if (ret)
|
if (ret)
|
||||||
IWL_WARN(mvm, "Failed sending remove station\n");
|
IWL_WARN(mvm, "Failed sending remove station\n");
|
||||||
@ -2272,7 +2276,8 @@ static void iwl_mvm_free_bcast_sta_queues(struct iwl_mvm *mvm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
queue = *queueptr;
|
queue = *queueptr;
|
||||||
iwl_mvm_disable_txq(mvm, NULL, queueptr, IWL_MAX_TID_COUNT);
|
iwl_mvm_disable_txq(mvm, NULL, mvmvif->bcast_sta.sta_id,
|
||||||
|
queueptr, IWL_MAX_TID_COUNT);
|
||||||
if (iwl_mvm_has_new_tx_api(mvm))
|
if (iwl_mvm_has_new_tx_api(mvm))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -2507,7 +2512,8 @@ int iwl_mvm_rm_mcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
|||||||
|
|
||||||
iwl_mvm_flush_sta(mvm, &mvmvif->mcast_sta, true);
|
iwl_mvm_flush_sta(mvm, &mvmvif->mcast_sta, true);
|
||||||
|
|
||||||
iwl_mvm_disable_txq(mvm, NULL, &mvmvif->cab_queue, 0);
|
iwl_mvm_disable_txq(mvm, NULL, mvmvif->mcast_sta.sta_id,
|
||||||
|
&mvmvif->cab_queue, 0);
|
||||||
|
|
||||||
ret = iwl_mvm_rm_sta_common(mvm, mvmvif->mcast_sta.sta_id);
|
ret = iwl_mvm_rm_sta_common(mvm, mvmvif->mcast_sta.sta_id);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user