Search Linux Wireless

Re: [PATCH v4 3/4] mac80211: Framework to get wifi-driver stats via ethtool.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 23, 2012 at 10:50 PM,  <greearb@xxxxxxxxxxxxxxx> wrote:
> From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
>
> This adds hooks to call into the driver to get additional
> stats for the ethtool API.
>
> Signed-off-by: Ben Greear <greearb@xxxxxxxxxxxxxxx>
> ---
[...]

> @@ -463,10 +463,17 @@ static int ieee80211_get_et_sset_count(struct wiphy *wiphy,
>                                       struct net_device *dev,
>                                       int sset)
>  {
> +       struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
> +       int rv = 0;
> +
>        if (sset == ETH_SS_STATS)
> -               return STA_STATS_LEN;
> +               rv += STA_STATS_LEN;
>
> -       return -EOPNOTSUPP;
> +       rv += drv_get_et_sset_count(sdata, sset);
> +
this is pretty confusing, because usually negative return value (e.g.
-EINVAL) is valid, and in this case it will corrupt the total sum
instead.

Eliad.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux