|
@@ -130,6 +130,41 @@ static int iwl_send_rss_cfg_cmd(struct iwl_mvm *mvm)
|
|
return iwl_mvm_send_cmd_pdu(mvm, RSS_CONFIG_CMD, 0, sizeof(cmd), &cmd);
|
|
return iwl_mvm_send_cmd_pdu(mvm, RSS_CONFIG_CMD, 0, sizeof(cmd), &cmd);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int iwl_configure_rxq(struct iwl_mvm *mvm)
|
|
|
|
+{
|
|
|
|
+ int i, num_queues, size;
|
|
|
|
+ struct iwl_rfh_queue_config *cmd;
|
|
|
|
+
|
|
|
|
+ /* Do not configure default queue, it is configured via context info */
|
|
|
|
+ num_queues = mvm->trans->num_rx_queues - 1;
|
|
|
|
+
|
|
|
|
+ size = sizeof(*cmd) + num_queues * sizeof(struct iwl_rfh_queue_data);
|
|
|
|
+
|
|
|
|
+ cmd = kzalloc(size, GFP_KERNEL);
|
|
|
|
+ if (!cmd)
|
|
|
|
+ return -ENOMEM;
|
|
|
|
+
|
|
|
|
+ cmd->num_queues = num_queues;
|
|
|
|
+
|
|
|
|
+ for (i = 0; i < num_queues; i++) {
|
|
|
|
+ struct iwl_trans_rxq_dma_data data;
|
|
|
|
+
|
|
|
|
+ cmd->data[i].q_num = i + 1;
|
|
|
|
+ iwl_trans_get_rxq_dma_data(mvm->trans, i + 1, &data);
|
|
|
|
+
|
|
|
|
+ cmd->data[i].fr_bd_cb = cpu_to_le64(data.fr_bd_cb);
|
|
|
|
+ cmd->data[i].urbd_stts_wrptr =
|
|
|
|
+ cpu_to_le64(data.urbd_stts_wrptr);
|
|
|
|
+ cmd->data[i].ur_bd_cb = cpu_to_le64(data.ur_bd_cb);
|
|
|
|
+ cmd->data[i].fr_bd_wid = cpu_to_le32(data.fr_bd_wid);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return iwl_mvm_send_cmd_pdu(mvm,
|
|
|
|
+ WIDE_ID(DATA_PATH_GROUP,
|
|
|
|
+ RFH_QUEUE_CONFIG_CMD),
|
|
|
|
+ 0, size, cmd);
|
|
|
|
+}
|
|
|
|
+
|
|
static int iwl_mvm_send_dqa_cmd(struct iwl_mvm *mvm)
|
|
static int iwl_mvm_send_dqa_cmd(struct iwl_mvm *mvm)
|
|
{
|
|
{
|
|
struct iwl_dqa_enable_cmd dqa_cmd = {
|
|
struct iwl_dqa_enable_cmd dqa_cmd = {
|
|
@@ -1007,9 +1042,16 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
|
|
goto error;
|
|
goto error;
|
|
|
|
|
|
/* Init RSS configuration */
|
|
/* Init RSS configuration */
|
|
- /* TODO - remove 22000 disablement when we have RXQ config API */
|
|
|
|
- if (iwl_mvm_has_new_rx_api(mvm) &&
|
|
|
|
- mvm->trans->cfg->device_family < IWL_DEVICE_FAMILY_22000) {
|
|
|
|
|
|
+ if (mvm->trans->cfg->device_family >= IWL_DEVICE_FAMILY_22000) {
|
|
|
|
+ ret = iwl_configure_rxq(mvm);
|
|
|
|
+ if (ret) {
|
|
|
|
+ IWL_ERR(mvm, "Failed to configure RX queues: %d\n",
|
|
|
|
+ ret);
|
|
|
|
+ goto error;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (iwl_mvm_has_new_rx_api(mvm)) {
|
|
ret = iwl_send_rss_cfg_cmd(mvm);
|
|
ret = iwl_send_rss_cfg_cmd(mvm);
|
|
if (ret) {
|
|
if (ret) {
|
|
IWL_ERR(mvm, "Failed to configure RSS queues: %d\n",
|
|
IWL_ERR(mvm, "Failed to configure RSS queues: %d\n",
|