From: Johannes Berg <johannes@sipsolutions.net>
To: Jouni Malinen <jouni@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] cfg80211: Extend support for IEEE 802.11r Fast BSS Transition
Date: Fri, 22 Feb 2013 21:36:34 +0100 [thread overview]
Message-ID: <1361565394.3420.17.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <20130221060843.GA24491@w1.fi>
On Wed, 2013-02-20 at 22:08 -0800, Jouni Malinen wrote:
> +int cfg80211_ft_event(struct net_device *dev,
> + struct cfg80211_ft_event_params *ft_event);
Is the return value really very useful?
> +static int nl80211_update_ft_ies(struct sk_buff *skb, struct genl_info *info)
> +{
> + struct cfg80211_registered_device *rdev = info->user_ptr[0];
> + struct cfg80211_update_ft_ies_params ft_params;
> + struct net_device *dev = info->user_ptr[1];
> +
> + if (!rdev->ops->update_ft_ies)
> + return -EOPNOTSUPP;
> +
> + if (!info->attrs[NL80211_ATTR_MDID] || !info->attrs[NL80211_ATTR_IE])
> + return -EINVAL;
> +
> + memset(&ft_params, 0, sizeof(ft_params));
> + ft_params.md = nla_get_u16(info->attrs[NL80211_ATTR_MDID]);
> + ft_params.ie = nla_data(info->attrs[NL80211_ATTR_IE]);
> + ft_params.ie_len = nla_len(info->attrs[NL80211_ATTR_IE]);
Should this use is_valid_ie_attr()?
> +int cfg80211_ft_event(struct net_device *dev,
> + struct cfg80211_ft_event_params *ft_event)
> +{
> + struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
> + struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
> +
> + return nl80211_ft_event(rdev, dev, ft_event);
> +}
> +EXPORT_SYMBOL(cfg80211_ft_event);
FWIW, I don't really see the need to have separate functions. I know we
have a whole bunch like that, but I think I'm just going to remove them
now. There's really no point, nl80211 and cfg80211 are two sides of the
same thing, I'd just put the cfg80211_ function into nl80211.c
> + hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_FT_EVENT);
> + if (!hdr) {
> + nlmsg_free(msg);
> + return -ENOMEM;
> + }
> +
> + nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx);
> + nla_put_u32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex);
> + if (ft_event->target_ap)
> + nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, ft_event->target_ap);
Would that really be valid without a new BSSID? That seems a bit odd.
johannes
next prev parent reply other threads:[~2013-02-22 20:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-21 6:08 [PATCH] cfg80211: Extend support for IEEE 802.11r Fast BSS Transition Jouni Malinen
2013-02-22 20:36 ` Johannes Berg [this message]
2013-02-26 10:38 ` [PATCHv2] " Jouni Malinen
2013-02-26 20:31 ` Johannes Berg
2013-02-27 15:14 ` [PATCHv3] " Jouni Malinen
2013-02-28 22:36 ` Johannes Berg
2013-02-28 22:41 ` Johannes Berg
2013-02-28 22:42 ` Johannes Berg
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=1361565394.3420.17.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=jouni@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
/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).