From patchwork Tue Mar 27 13:46:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamizh chelvam X-Patchwork-Id: 10310105 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4EB36605B4 for ; Tue, 27 Mar 2018 13:48:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 410E829D3B for ; Tue, 27 Mar 2018 13:48:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35AA729D43; Tue, 27 Mar 2018 13:48:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFF0829D3B for ; Tue, 27 Mar 2018 13:48:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752743AbeC0NsD (ORCPT ); Tue, 27 Mar 2018 09:48:03 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:52634 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752642AbeC0Nry (ORCPT ); Tue, 27 Mar 2018 09:47:54 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C9E9B602BA; Tue, 27 Mar 2018 13:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522158473; bh=76c0Gd3tTjGw+yyqi/EfhEgaOQf61CwTUuDbkTM3rOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WmmcBx0BrYjd7gVjALrCSPbZMV3qRm9Ud5QOahWfoiRzJIbNO5+rMNA5oJpElYXOU BkuRza0LKDdLtWYeAX+1tyXRPk8xAMUouX98MBCMIe1sTfMm5BWwUq7DZXpfXHFc3K UAOKsqeThEaJ7qJqz9yYn2vvuLZ2rneTr+vWZ9HU= Received: from cheath10p342229-lin.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tamizhr@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 49BB86030F; Tue, 27 Mar 2018 13:47:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522158465; bh=76c0Gd3tTjGw+yyqi/EfhEgaOQf61CwTUuDbkTM3rOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZcAJhruEk0GnrAxnE3YGa7wzODq5uWHdPQ5TpO+dCb71gyZPf6KSi1ksDQj8+IprX Ti2pA48KRS52inYHIiCMPzSl5T7RAvEKm6i+TDsv7y8swJE4IclTHCV5yu4prcnja9 GPIYuvgG3P/lrFS8o8O/vEN3wxPcWfDhi/Oc5wLM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 49BB86030F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=tamizhr@codeaurora.org From: Tamizh chelvam To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Tamizh chelvam Subject: [PATCH 1/3] cfg80211: fix data type of sta_opmode_info parameter Date: Tue, 27 Mar 2018 19:16:15 +0530 Message-Id: <1522158377-3566-2-git-send-email-tamizhr@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1522158377-3566-1-git-send-email-tamizhr@codeaurora.org> References: <1522158377-3566-1-git-send-email-tamizhr@codeaurora.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently bw and smps_mode are u8 type value in sta_opmode_info structure. This values filled in mac80211 from ieee80211_sta_rx_bandwidth and ieee80211_smps_mode. These enum values are specific to mac80211 and userspace/cfg80211 doesn't know about that. This will lead to incorrect result/assumption by the user space application. Change bw and smps_mode parameters to their respective enums in nl80211. Signed-off-by: Tamizh chelvam --- include/net/cfg80211.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index fc40843..4341508 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -3572,15 +3572,15 @@ enum wiphy_opmode_flag { /** * struct sta_opmode_info - Station's ht/vht operation mode information * @changed: contains value from &enum wiphy_opmode_flag - * @smps_mode: New SMPS mode of a station - * @bw: new max bandwidth value of a station + * @smps_mode: New SMPS mode value from &enum nl80211_smps_mode of a station + * @bw: new max bandwidth value from &enum nl80211_chan_width of a station * @rx_nss: new rx_nss value of a station */ struct sta_opmode_info { u32 changed; - u8 smps_mode; - u8 bw; + enum nl80211_smps_mode smps_mode; + enum nl80211_chan_width bw; u8 rx_nss; };