[PATCH v2 1/2] cfg80211: Add support to set tx power for a station associated

Ben Greear greearb at candelatech.com
Wed Feb 1 09:36:00 PST 2017


On 02/01/2017 09:27 AM, Ashok Raj Nagarajan wrote:

>>> +static int nl80211_parse_sta_txpower_setting(struct genl_info *info,
>>> +                         struct station_parameters *params)
>>> +{
>>> +    struct cfg80211_registered_device *rdev = info->user_ptr[0];
>>> +    enum nl80211_tx_power_setting type;
>>> +    int idx;
>>> +
>>> +    if (!rdev->ops->set_tx_power ||
>>> +        !wiphy_ext_feature_isset(&rdev->wiphy,
>>> +                     NL80211_EXT_FEATURE_STA_TX_PWR))
>>> +        return -EOPNOTSUPP;
>>
>> Maybe always let a user set to default value even if the driver does not
>> support setting specific values?
>>
>
> IMHO, having some default value in place of non-valid values may not be the right way.

If a user or user-space script wants to always be able to initialize things to default
values, it would be nice if it did not have to pay specific attention to whether the
NIC supports STA_TX_PWR feature or not.  Since a NIC that does not support this feature will always
have sta TX power set to default by definition, that is why I think you should let
the call succeed in that case.

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com




More information about the ath10k mailing list