[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <552143AE.5060109@cogentembedded.com>
Date: Sun, 05 Apr 2015 17:16:14 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: greearb@...delatech.com, netdev@...r.kernel.org
CC: johannes@...solutions.net
Subject: Re: [PATCH 1/4] mac80211-hwsim: notify user-space about channel change.
Hello.
On 4/4/2015 12:12 AM, greearb@...delatech.com wrote:
> From: Ben Greear <greearb@...delatech.com>
> The goal is to allow the user-space application to properly
> filter packets before sending them down to the kernel. This
> should more closely mimic what a real piece of hardware would
> do.
> Signed-off-by: Ben Greear <greearb@...delatech.com>
> ---
> drivers/net/wireless/mac80211_hwsim.c | 48 +++++++++++++++++++++++++++++++++++
> drivers/net/wireless/mac80211_hwsim.h | 6 +++++
> 2 files changed, 54 insertions(+)
> diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
> index 8908be6..d0e88b2 100644
> --- a/drivers/net/wireless/mac80211_hwsim.c
> +++ b/drivers/net/wireless/mac80211_hwsim.c
> @@ -871,6 +871,52 @@ static bool hwsim_ps_rx_ok(struct mac80211_hwsim_data *data,
> return true;
> }
>
> +static void mac80211_hwsim_check_nl_notify(struct mac80211_hwsim_data *data)
> +{
> + struct sk_buff *skb;
> + u32 center_freq = 0;
> + u32 _portid;
> + void *msg_head;
> +
> + /* wmediumd mode check */
> + _portid = ACCESS_ONCE(wmediumd_portid);
> +
I don't think empty line is needed here...
> + if (!_portid)
> + return;
> +
> + skb = genlmsg_new(GENLMSG_DEFAULT_SIZE, GFP_ATOMIC);
> + if (skb == NULL)
Hm, have you run this thru scripts/checkpatch.pl? It should have
recommended using '!skb' instead (which would have been only consistent with
your previous code).
> + goto err_print;
> +
> + msg_head = genlmsg_put(skb, 0, 0, &hwsim_genl_family, 0,
> + HWSIM_CMD_NOTIFY);
> + if (msg_head == NULL) {
Same here.
[...]
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists