From: Johannes Berg <johannes@sipsolutions.net>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH V2 iw] add "channels" PHY command listing frequencies with more details
Date: Tue, 31 May 2016 20:16:26 +0200 [thread overview]
Message-ID: <1464718586.3076.34.camel@sipsolutions.net> (raw)
In-Reply-To: <1464712100-4489-1-git-send-email-zajec5@gmail.com> (sfid-20160531_182829_340312_AD90B111)
On Tue, 2016-05-31 at 18:28 +0200, Rafał Miłecki wrote:
>
> +static int print_channels_handler(struct nl_msg *msg, void *arg)
> +{
> + struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
> +
extra blank line
> + struct nlattr *tb_msg[NL80211_ATTR_MAX + 1];
> + struct nlattr *tb_band[NL80211_BAND_ATTR_MAX + 1];
> + struct nlattr *tb_freq[NL80211_FREQUENCY_ATTR_MAX + 1];
> + struct nlattr *nl_band;
> + struct nlattr *nl_freq;
> + int rem_band, rem_freq;
> + static int last_band = -1;
> + static bool width_40, width_80, width_160;
You shouldn't make them static - make a little struct containing them,
and pass it as "arg"
> +static int handle_channels(struct nl80211_state *state, struct
> nl_msg *msg,
> + int argc, char **argv, enum id_input id)
> +{
struct ... xyz = {};
> + nla_put_flag(msg, NL80211_ATTR_SPLIT_WIPHY_DUMP);
> + nlmsg_hdr(msg)->nlmsg_flags |= NLM_F_DUMP;
> +
> + register_handler(print_channels_handler, NULL);
register_handler(..., &xyz);
johannes
next prev parent reply other threads:[~2016-05-31 18:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-20 10:13 [PATCH iw] add "channels" PHY command listing frequencies with more details Rafał Miłecki
2016-05-31 10:16 ` Johannes Berg
2016-05-31 13:10 ` Rafał Miłecki
2016-05-31 13:14 ` Johannes Berg
2016-05-31 15:58 ` Rafał Miłecki
2016-05-31 16:20 ` Rafał Miłecki
2016-05-31 16:28 ` [PATCH V2 " Rafał Miłecki
2016-05-31 18:16 ` Johannes Berg [this message]
2016-06-01 5:51 ` [PATCH V3 " Rafał Miłecki
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=1464718586.3076.34.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=zajec5@gmail.com \
/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: link
Be 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.