From: Johannes Berg <johannes@sipsolutions.net> To: Balaji Pothunoori <bpothuno@codeaurora.org>, ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Ashok Raj Nagarajan <arnagara@codeaurora.org> Subject: Re: [PATCH 1/3] cfg80211: Add support to set tx power for a station associated Date: Fri, 25 Jan 2019 13:32:08 +0100 [thread overview] Message-ID: <5b2d0128ff33cdeb268a3954c4aab3ab7b1145c6.camel@sipsolutions.net> (raw) In-Reply-To: <1547724167-11420-1-git-send-email-bpothuno@codeaurora.org> On Thu, 2019-01-17 at 16:52 +0530, Balaji Pothunoori wrote: > > + s16 txpwr; > + enum nl80211_tx_power_setting type; you should probably call this txpwr_type, or do something like struct { s16 power; enum ... type; } txpwr; > + [NL80211_ATTR_STA_TX_POWER_SETTING] = { .type = NLA_U8 }, That should use NLA_POLICY_RANGE() > + [NL80211_ATTR_STA_TX_POWER] = { .type = NLA_S16 }, > + params->type = nla_get_u32(info->attrs[idx]); > + > + if (params->type == NL80211_TX_POWER_LIMITED) { > + idx = NL80211_ATTR_STA_TX_POWER; > + params->txpwr = nla_get_u32(info->attrs[idx]); You cannot use nla_get_u32 with U8/S16 attributes, use the correct corresponding helper. johannes
WARNING: multiple messages have this Message-ID (diff)
From: Johannes Berg <johannes@sipsolutions.net> To: Balaji Pothunoori <bpothuno@codeaurora.org>, ath10k@lists.infradead.org Cc: Ashok Raj Nagarajan <arnagara@codeaurora.org>, linux-wireless@vger.kernel.org Subject: Re: [PATCH 1/3] cfg80211: Add support to set tx power for a station associated Date: Fri, 25 Jan 2019 13:32:08 +0100 [thread overview] Message-ID: <5b2d0128ff33cdeb268a3954c4aab3ab7b1145c6.camel@sipsolutions.net> (raw) In-Reply-To: <1547724167-11420-1-git-send-email-bpothuno@codeaurora.org> On Thu, 2019-01-17 at 16:52 +0530, Balaji Pothunoori wrote: > > + s16 txpwr; > + enum nl80211_tx_power_setting type; you should probably call this txpwr_type, or do something like struct { s16 power; enum ... type; } txpwr; > + [NL80211_ATTR_STA_TX_POWER_SETTING] = { .type = NLA_U8 }, That should use NLA_POLICY_RANGE() > + [NL80211_ATTR_STA_TX_POWER] = { .type = NLA_S16 }, > + params->type = nla_get_u32(info->attrs[idx]); > + > + if (params->type == NL80211_TX_POWER_LIMITED) { > + idx = NL80211_ATTR_STA_TX_POWER; > + params->txpwr = nla_get_u32(info->attrs[idx]); You cannot use nla_get_u32 with U8/S16 attributes, use the correct corresponding helper. johannes _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k
next prev parent reply other threads:[~2019-01-25 12:32 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-01-17 11:22 [PATCH 1/3] cfg80211: Add support to set tx power for a station associated Balaji Pothunoori 2019-01-17 11:22 ` Balaji Pothunoori 2019-01-25 12:32 ` Johannes Berg [this message] 2019-01-25 12:32 ` Johannes Berg
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=5b2d0128ff33cdeb268a3954c4aab3ab7b1145c6.camel@sipsolutions.net \ --to=johannes@sipsolutions.net \ --cc=arnagara@codeaurora.org \ --cc=ath10k@lists.infradead.org \ --cc=bpothuno@codeaurora.org \ --cc=linux-wireless@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.