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

Reply via email to