From patchwork Tue Mar 27 06:48:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamizh chelvam X-Patchwork-Id: 10309355 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 65FA06037D for ; Tue, 27 Mar 2018 06:50:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47E8C2962B for ; Tue, 27 Mar 2018 06:50:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3BC9329BA0; Tue, 27 Mar 2018 06:50:19 +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 879C129B9A for ; Tue, 27 Mar 2018 06:50:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751146AbeC0GuQ (ORCPT ); Tue, 27 Mar 2018 02:50:16 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:36056 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751114AbeC0GuP (ORCPT ); Tue, 27 Mar 2018 02:50:15 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 6A00E60ACA; Tue, 27 Mar 2018 06:50:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522133415; bh=76c0Gd3tTjGw+yyqi/EfhEgaOQf61CwTUuDbkTM3rOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SnuZfGqeSrebT/ZZod9OCEU2hZ/Atc3kPND0vOLG5kzHwhn+bxx0RPfhB1GJSMjYm +vmhNSrUiWq+sIMKHWjipuYmBAob+Bnq5y6g33hmKvGIAgy1cWMNNz64sPKxFZxdjs iv5Zujbv250RGKAe7QQgzkCmDHprIOhP7WoWmuxQ= 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 E723660588; Tue, 27 Mar 2018 06:50:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522133414; bh=76c0Gd3tTjGw+yyqi/EfhEgaOQf61CwTUuDbkTM3rOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WO/e8YCn0pBoEkDBpXvmr1z4IRhAitNAokQmFpGjneuPSUkjfglggKIB8/VwkyDCJ CX6CXDm3OiS5d4yVmisbq5blyWOFl19OcjjSAE/rrsbGtx3NFa8nWZ2jVxF8MKC3lH IhCtS/JbastCRoOKsB/4TDtIvIoC92RHypH1kBn4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E723660588 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: [RFC 1/3] cfg80211: fix data type of sta_opmode_info parameter Date: Tue, 27 Mar 2018 12:18:14 +0530 Message-Id: <1522133296-2583-2-git-send-email-tamizhr@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1522133296-2583-1-git-send-email-tamizhr@codeaurora.org> References: <1522133296-2583-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; };