From: Johannes Berg <johannes@sipsolutions.net>
To: Arik Nemtsov <arik@wizery.com>
Cc: linux-wireless@vger.kernel.org, Luciano Coelho <coelho@ti.com>,
"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [PATCH v2 4/6] mac80211: Save probe response data for BSS
Date: Mon, 24 Jan 2011 12:38:46 +0100 [thread overview]
Message-ID: <1295869126.3639.4.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1295816579-28925-5-git-send-email-arik@wizery.com>
On Sun, 2011-01-23 at 23:02 +0200, Arik Nemtsov wrote:
> +static int ieee80211_set_probe_resp(struct wiphy *wiphy,
> + struct net_device *dev, u8 *resp,
> + size_t resp_len)
> +{
> + struct ieee80211_sub_if_data *sdata;
> + struct sk_buff *new, *old;
> +
> + sdata = IEEE80211_DEV_TO_SUB_IF(dev);
> + old = sdata->u.ap.probe_resp;
> +
> + if (!resp || !resp_len)
> + return -EINVAL;
> +
> + new = dev_alloc_skb(resp_len);
> + if (!new) {
> + printk(KERN_DEBUG "%s: failed to allocate buffer for probe "
> + "response template\n", sdata->name);
> + return -ENOMEM;
I'd remove that message -- userspace already knows, and it's the only
thing that really needs to?
> + }
> +
> + memcpy(skb_put(new, resp_len), resp, resp_len);
> +
> + rcu_assign_pointer(sdata->u.ap.probe_resp, new);
> + synchronize_rcu();
> +
> + if (old)
> + dev_kfree_skb(old);
Just a note -- I don't really expect you to implement this -- but I
think since the skb's CB is not used otherwise, we could easily use
call_rcu() to free it.
johannes
next prev parent reply other threads:[~2011-01-24 11:37 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-23 21:02 [PATCH v2 0/6] Probe-resp offloading support Arik Nemtsov
2011-01-23 21:02 ` [PATCH v2 1/6] nl80211: allow passing SSID in nl80211_set_bss Arik Nemtsov
2011-01-23 21:02 ` [PATCH v2 2/6] nl80211: Pass probe response data to drivers Arik Nemtsov
2011-01-24 11:35 ` Johannes Berg
2011-01-24 20:47 ` Arik Nemtsov
2011-01-25 10:12 ` Johannes Berg
2011-01-26 6:00 ` Arik Nemtsov
2011-01-26 8:32 ` Johannes Berg
2011-01-26 21:51 ` Arik Nemtsov
2011-01-26 21:55 ` Johannes Berg
2011-01-27 13:29 ` Johannes Berg
2011-01-30 10:34 ` Arik Nemtsov
2011-01-30 10:44 ` Johannes Berg
2011-01-23 21:02 ` [PATCH v2 3/6] mac80211: add SSID for AP mode with change notification Arik Nemtsov
2011-01-23 21:02 ` [PATCH v2 4/6] mac80211: Save probe response data for BSS Arik Nemtsov
2011-01-24 11:38 ` Johannes Berg [this message]
2011-01-26 5:54 ` Arik Nemtsov
2011-01-23 21:02 ` [PATCH v2 5/6] wl12xx: AP mode - support hidden SSID Arik Nemtsov
2011-01-23 21:02 ` [PATCH v2 6/6] wl12xx: configure probe-resp template according to notification Arik Nemtsov
2011-01-24 9:44 ` [PATCH v2 0/6] Probe-resp offloading support Jouni Malinen
2011-01-24 21:16 ` Arik Nemtsov
2011-01-25 9:41 ` Jouni Malinen
2011-01-26 6:08 ` Arik Nemtsov
2011-01-26 6:24 ` Arik Nemtsov
2011-01-26 9:46 ` Jouni Malinen
2011-01-24 11:41 ` Johannes Berg
2011-01-24 21:21 ` Arik Nemtsov
2011-01-25 10:10 ` Johannes Berg
2011-01-25 10:42 ` Johannes Berg
2011-01-26 6:38 ` Arik Nemtsov
2011-01-26 6:35 ` Arik Nemtsov
2011-01-26 8:44 ` Johannes Berg
2011-01-26 14:04 ` Jouni Malinen
2011-01-30 11:24 ` Arik Nemtsov
2011-01-30 18:37 ` Jouni Malinen
2011-01-30 22:19 ` Arik Nemtsov
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=1295869126.3639.4.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=arik@wizery.com \
--cc=coelho@ti.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).