From patchwork Thu Dec 5 06:26:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Crispin X-Patchwork-Id: 11274225 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EEDFF14BD for ; Thu, 5 Dec 2019 06:27:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CD0672245C for ; Thu, 5 Dec 2019 06:27:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ff5EOO2m" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD0672245C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=phrozen.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=qBTFQzlv30gKYIQM9z9SmHGJI1PNNSyvlRT6AZS20DY=; b=Ff5EOO2mslXDsS IqLIxf2uHMriDquCJTQsPGRQIBUtO/W4Ro/AdU2H5+sVZFG9+3OdpGZb+kPYujll2oFPyZXD9iPzb 2KApKcLu3yCEQeRLIgh6QcrWZKdQgIDhWeJE8+QUrzbpusudWjiJGHrjvv5qzijr+U9TENMt04uQj vGiOi29uw0/kgITspXIMHjJQtYvT9X3+K6ue/ZtDv7MSPE8H7uwqR+Xlnv6zQg/DETI3t9oOqiMNb mjC33s9xwtMeo4aERaie/riECfkOhfxEUltaOxUb6nhy4+bfdd0fltGywJCh8NcSH6TezhEDRMm7Z e7lxvygSu5L9f1r4KkuA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ickbM-0000fM-Er; Thu, 05 Dec 2019 06:27:00 +0000 Received: from nbd.name ([2a01:4f8:221:3d45::2]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ickbJ-0000aw-2Y for ath11k@lists.infradead.org; Thu, 05 Dec 2019 06:26:58 +0000 Received: from pd95fd3d5.dip0.t-ipconnect.de ([217.95.211.213] helo=bertha.datto.lan) by ds12 with esmtpa (Exim 4.89) (envelope-from ) id 1ickbC-0001bo-Mw; Thu, 05 Dec 2019 07:26:50 +0100 From: John Crispin To: Kalle Valo Subject: [PATCH 1/2] ath11k: add some missing __packed qualifiers Date: Thu, 5 Dec 2019 07:26:44 +0100 Message-Id: <20191205062645.6033-1-john@phrozen.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191204_222657_281313_91E8B5FF X-CRM114-Status: UNSURE ( 8.86 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, John Crispin Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org A few of the WMI parameter structs were missing this. Signed-off-by: John Crispin --- drivers/net/wireless/ath/ath11k/wmi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h index 0d7caa1e4d75..7a1ed73d8b7b 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.h +++ b/drivers/net/wireless/ath/ath11k/wmi.h @@ -4562,12 +4562,12 @@ struct wmi_twt_enable_params_cmd { u32 mode_check_interval; u32 add_sta_slot_interval; u32 remove_sta_slot_interval; -}; +} __packed; struct wmi_twt_disable_params_cmd { u32 tlv_header; u32 pdev_id; -}; +} __packed; enum WMI_HOST_TWT_COMMAND { WMI_HOST_TWT_COMMAND_REQUEST_TWT = 0, @@ -4682,7 +4682,7 @@ struct wmi_obss_spatial_reuse_params_cmd { s32 obss_min; s32 obss_max; u32 vdev_id; -}; +} __packed; struct target_resource_config { u32 num_vdevs; From patchwork Thu Dec 5 06:26:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Crispin X-Patchwork-Id: 11274227 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 03CA8186D for ; Thu, 5 Dec 2019 06:27:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D694B224F8 for ; Thu, 5 Dec 2019 06:27:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="u2bf5+mt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D694B224F8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=phrozen.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=siG4coi4qE4IlOlTyrroXdHS3fqONdEqFiHhfwVNIwI=; b=u2bf5+mtqmbWxG y1vZn79+UlI2Ngcylz4KDoeAO82ZxaAd6DftGAstBYfJmlwzJDWTSVlwy+TZnVhTCKknZPoF/AY9P kV0AtMFRhqrA9AkcBTtZJNiOLns5hGSP6ACOqApkzNWz4y3KPzhebmYVwbiAcE6BGE6BLdjbDQXnx CftyfLqJE1Za23nTKZYC3/+oXisYfOFB7BOBL7ytd4t1XW6Ey0lzer75PjufEu66gSk2P0sLexWj8 6Y4vCUT+jptP8k0SuwtCDtBLxv00tLYDPsQv957YwE45/L1CJSCarIQClsZ6F9vHVMjtcGuJWuAu7 B52E1b4b1ZdfipjyhPnw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ickbM-0000fc-MH; Thu, 05 Dec 2019 06:27:00 +0000 Received: from nbd.name ([2a01:4f8:221:3d45::2]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ickbJ-0000az-2Z for ath11k@lists.infradead.org; Thu, 05 Dec 2019 06:26:58 +0000 Received: from pd95fd3d5.dip0.t-ipconnect.de ([217.95.211.213] helo=bertha.datto.lan) by ds12 with esmtpa (Exim 4.89) (envelope-from ) id 1ickbD-0001bo-4S; Thu, 05 Dec 2019 07:26:51 +0100 From: John Crispin To: Kalle Valo Subject: [PATCH 2/2] ath11k: explicitly cast wmi commands to their correct struct type Date: Thu, 5 Dec 2019 07:26:45 +0100 Message-Id: <20191205062645.6033-2-john@phrozen.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191205062645.6033-1-john@phrozen.org> References: <20191205062645.6033-1-john@phrozen.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191204_222657_280749_389BBC72 X-CRM114-Status: UNSURE ( 9.71 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, John Crispin Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org Three of the WMI command handlers were not casting to the right data type. Lets make the code consistent with the other handlers. Signed-off-by: John Crispin --- drivers/net/wireless/ath/ath11k/wmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c index a2f03360e19f..0c1064a0aa39 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -2517,7 +2517,7 @@ ath11k_wmi_send_twt_enable_cmd(struct ath11k *ar, u32 pdev_id) if (!skb) return -ENOMEM; - cmd = (void *)skb->data; + cmd = (struct wmi_twt_enable_params_cmd *)skb->data; cmd->tlv_header = FIELD_PREP(WMI_TLV_TAG, WMI_TAG_TWT_ENABLE_CMD) | FIELD_PREP(WMI_TLV_LEN, len - TLV_HDR_SIZE); cmd->pdev_id = pdev_id; @@ -2568,7 +2568,7 @@ ath11k_wmi_send_twt_disable_cmd(struct ath11k *ar, u32 pdev_id) if (!skb) return -ENOMEM; - cmd = (void *)skb->data; + cmd = (struct wmi_twt_disable_params_cmd *)skb->data; cmd->tlv_header = FIELD_PREP(WMI_TLV_TAG, WMI_TAG_TWT_DISABLE_CMD) | FIELD_PREP(WMI_TLV_LEN, len - TLV_HDR_SIZE); cmd->pdev_id = pdev_id; @@ -2768,7 +2768,7 @@ ath11k_wmi_send_obss_spr_cmd(struct ath11k *ar, u32 vdev_id, if (!skb) return -ENOMEM; - cmd = (void *)skb->data; + cmd = (struct wmi_obss_spatial_reuse_params_cmd *)skb->data; cmd->tlv_header = FIELD_PREP(WMI_TLV_TAG, WMI_TAG_OBSS_SPATIAL_REUSE_SET_CMD) | FIELD_PREP(WMI_TLV_LEN, len - TLV_HDR_SIZE);