Search Linux Wireless

Re: [PATCH] mac80211: add debugfs file for HW queues

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

 



On Thu, 2012-11-08 at 17:36 +0200, Eliad Peller wrote:
> On Thu, Nov 8, 2012 at 4:31 PM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote:
> > From: Johannes Berg <johannes.berg@xxxxxxxxx>
> >
> > Add a debugfs file showing which HW queues were
> > allocated to a virtual interface, including the
> > CAB queue for AP interfaces.
> >
> > Change-Id: I486924e961b6ad6785a79db09620919ee644e703
> > Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
> > ---
> >  net/mac80211/debugfs_netdev.c | 21 +++++++++++++++++++++
> >  1 file changed, 21 insertions(+)
> >
> > diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
> > index 3393ad5..c3f089a 100644
> > --- a/net/mac80211/debugfs_netdev.c
> > +++ b/net/mac80211/debugfs_netdev.c
> > @@ -169,6 +169,26 @@ IEEE80211_IF_FILE(flags, flags, HEX);
> >  IEEE80211_IF_FILE(state, state, LHEX);
> >  IEEE80211_IF_FILE(channel_type, vif.bss_conf.channel_type, DEC);
> >
> > +static ssize_t
> > +ieee80211_if_fmt_hw_queues(const struct ieee80211_sub_if_data *sdata,
> > +                          char *buf, int buflen)
> > +{
> > +       int len;
> > +
> > +       len = scnprintf(buf, buflen, "AC queues: VO:%d VI:%d BE:%d BK:%d\n",
> > +                       sdata->vif.hw_queue[IEEE80211_AC_VO],
> > +                       sdata->vif.hw_queue[IEEE80211_AC_VI],
> > +                       sdata->vif.hw_queue[IEEE80211_AC_BE],
> > +                       sdata->vif.hw_queue[IEEE80211_AC_BK]);
> > +
> > +       if (sdata->vif.type == NL80211_IFTYPE_AP && len < buflen)
> > +               len += scnprintf(buf + len, buflen - len, "cab queue: %d\n",
> > +                                sdata->vif.cab_queue);
> > +
> the (len < buflen) condition is redundant (scnprintf returns the
> number of chars written not including the trailing NULL, so it will
> always be < buflen)

Err, yeah, good point. Thanks.

johannes

--
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