Merge tag 'wireless-next-2022-03-11' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / drivers / net / wireless / intel / iwlwifi / mvm / debugfs.c
index 445c94a..49898fd 100644 (file)
@@ -426,8 +426,7 @@ static ssize_t iwl_dbgfs_amsdu_len_write(struct ieee80211_sta *sta,
                return -EINVAL;
 
        /* only change from debug set <-> debug unset */
-       if ((amsdu_len && mvmsta->orig_amsdu_len) ||
-           (!!amsdu_len && mvmsta->orig_amsdu_len))
+       if (amsdu_len && mvmsta->orig_amsdu_len)
                return -EBUSY;
 
        if (amsdu_len) {
@@ -1479,7 +1478,7 @@ iwl_dbgfs_he_sniffer_params_write(struct iwl_mvm *mvm, char *buf,
                .mvm = mvm,
        };
        u16 wait_cmds[] = {
-               iwl_cmd_id(HE_AIR_SNIFFER_CONFIG_CMD, DATA_PATH_GROUP, 0),
+               WIDE_ID(DATA_PATH_GROUP, HE_AIR_SNIFFER_CONFIG_CMD),
        };
        u32 aid;
        int ret;
@@ -1514,8 +1513,9 @@ iwl_dbgfs_he_sniffer_params_write(struct iwl_mvm *mvm, char *buf,
                                   wait_cmds, ARRAY_SIZE(wait_cmds),
                                   iwl_mvm_sniffer_apply, &apply);
 
-       ret = iwl_mvm_send_cmd_pdu(mvm, iwl_cmd_id(HE_AIR_SNIFFER_CONFIG_CMD,
-                                                  DATA_PATH_GROUP, 0), 0,
+       ret = iwl_mvm_send_cmd_pdu(mvm,
+                                  WIDE_ID(DATA_PATH_GROUP, HE_AIR_SNIFFER_CONFIG_CMD),
+                                  0,
                                   sizeof(he_mon_cmd), &he_mon_cmd);
 
        /* no need to really wait, we already did anyway */
@@ -1727,8 +1727,7 @@ static ssize_t iwl_dbgfs_mem_read(struct file *file, char __user *user_buf,
        if (!iwl_mvm_firmware_running(mvm))
                return -EIO;
 
-       hcmd.id = iwl_cmd_id(*ppos >> 24 ? UMAC_RD_WR : LMAC_RD_WR,
-                            DEBUG_GROUP, 0);
+       hcmd.id = WIDE_ID(DEBUG_GROUP, *ppos >> 24 ? UMAC_RD_WR : LMAC_RD_WR);
        cmd.op = cpu_to_le32(DEBUG_MEM_OP_READ);
 
        /* Take care of alignment of both the position and the length */
@@ -1758,7 +1757,7 @@ static ssize_t iwl_dbgfs_mem_read(struct file *file, char __user *user_buf,
                goto out;
        }
 
-       ret = len - copy_to_user(user_buf, (void *)rsp->data + delta, len);
+       ret = len - copy_to_user(user_buf, (u8 *)rsp->data + delta, len);
        *ppos += ret;
 
 out:
@@ -1782,8 +1781,7 @@ static ssize_t iwl_dbgfs_mem_write(struct file *file,
        if (!iwl_mvm_firmware_running(mvm))
                return -EIO;
 
-       hcmd.id = iwl_cmd_id(*ppos >> 24 ? UMAC_RD_WR : LMAC_RD_WR,
-                            DEBUG_GROUP, 0);
+       hcmd.id = WIDE_ID(DEBUG_GROUP, *ppos >> 24 ? UMAC_RD_WR : LMAC_RD_WR);
 
        if (*ppos & 0x3 || count < 4) {
                op = DEBUG_MEM_OP_WRITE_BYTES;