From: Johannes Berg <johannes@sipsolutions.net>
To: Rostislav Lisovy <lisovy@gmail.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
Michal Sojka <sojkam1@fel.cvut.cz>,
s.sander@nordsys.de, jan-niklas.meier@volkswagen.de,
burak.simsek@volkswagen.de,
Emmanuel Thierry <emmanuel.thierry@yogoko.fr>,
laszlo.virag@commsignia.com,
Rostislav Lisovy <rostislav.lisovy@fel.cvut.cz>
Subject: Re: [PATCH 4/4] nl80211: Join and Leave handling for OCB mode
Date: Thu, 09 Oct 2014 10:31:19 +0200 [thread overview]
Message-ID: <1412843479.1828.22.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1410445822-6559-5-git-send-email-rostislav.lisovy@fel.cvut.cz> (sfid-20140911_163052_322975_2F1DAFAB)
On Thu, 2014-09-11 at 16:30 +0200, Rostislav Lisovy wrote:
> Signed-off-by: Rostislav Lisovy <rostislav.lisovy@fel.cvut.cz>
same comment about commit log here - also this patch should either go
first in the series, or just be squashed with the cfg80211 patch,
there's no real need to distinguish between the two. I guess it can't be
first, so best just squash it.
I think you can also squash patches 1 and 2, since 2 is so small.
> ---
> include/uapi/linux/nl80211.h | 8 ++++++++
> net/wireless/nl80211.c | 47 ++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 55 insertions(+)
>
> diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
> index cdf9ba4..4b39455 100644
> --- a/include/uapi/linux/nl80211.h
> +++ b/include/uapi/linux/nl80211.h
> @@ -544,6 +544,11 @@
> * @NL80211_CMD_LEAVE_MESH: Leave the mesh network -- no special arguments, the
> * network is determined by the network interface.
> *
> + * @NL80211_CMD_JOIN_OCB: Join the OCB network. The center frequency and
> + * bandwidth of a channel must be given.
> + * @NL80211_CMD_LEAVE_OCB: Leave the OCB network -- no special arguments, the
> + * network is determined by the network interface.
> + *
> * @NL80211_CMD_UNPROT_DEAUTHENTICATE: Unprotected deauthentication frame
> * notification. This event is used to indicate that an unprotected
> * deauthentication frame was dropped when MFP is in use.
> @@ -833,6 +838,9 @@ enum nl80211_commands {
> NL80211_CMD_JOIN_MESH,
> NL80211_CMD_LEAVE_MESH,
>
> + NL80211_CMD_JOIN_OCB,
> + NL80211_CMD_LEAVE_OCB,
> +
> NL80211_CMD_UNPROT_DEAUTHENTICATE,
> NL80211_CMD_UNPROT_DISASSOCIATE,
No no, you really really really can't add anything in the middle of this
enum. The's a comments at the top of it explaining why :)
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index cf178d2..bfbb54d 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -1876,6 +1876,7 @@ static bool nl80211_can_set_dev_channel(struct wireless_dev *wdev)
> * operation to set the monitor channel if possible.
> */
> return !wdev ||
> + wdev->iftype == NL80211_IFTYPE_OCB ||
> wdev->iftype == NL80211_IFTYPE_AP ||
> wdev->iftype == NL80211_IFTYPE_MESH_POINT ||
> wdev->iftype == NL80211_IFTYPE_MONITOR ||
I don't think this is right - join() handles the channel setting.
> @@ -2307,6 +2308,8 @@ static int nl80211_send_chandef(struct sk_buff *msg,
> chandef->chan->center_freq))
> return -ENOBUFS;
> switch (chandef->width) {
> + case NL80211_CHAN_WIDTH_5:
> + case NL80211_CHAN_WIDTH_10:
This is also wrong, just like the cfg80211.h change in the other patch,
since the NL80211_ATTR_WIPHY_CHANNEL_TYPE cannot encode 5/10 MHz.
You need to remove both changes.
> +static int nl80211_join_ocb(struct sk_buff *skb, struct genl_info *info)
> +{
> + struct cfg80211_registered_device *rdev = info->user_ptr[0];
> + struct net_device *dev = info->user_ptr[1];
> + struct ocb_setup setup;
> + int err;
> +
> + /* start with default */
> + memset(&setup, 0x0, sizeof(setup));
struct ocb_setup setup = {};
Would be an easier way to generate the same code. IMHO no comment is
needed.
johannes
prev parent reply other threads:[~2014-10-09 8:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 14:30 [PATCH 0/4] 802.11p OCB mode Rostislav Lisovy
2014-09-11 14:30 ` [PATCH 1/4] mac80211: OCB mode + join and leave handling Rostislav Lisovy
2014-10-09 8:23 ` Johannes Berg
2014-10-16 16:33 ` Rostislav Lisovy
2014-10-16 17:20 ` Rostislav Lisovy
2014-10-20 9:41 ` Johannes Berg
2014-10-20 9:40 ` Johannes Berg
2014-09-11 14:30 ` [PATCH 2/4] mac80211: Use different EDCA config for OCB Rostislav Lisovy
2014-09-11 14:30 ` [PATCH 3/4] cfg80211: Join and Leave handling for OCB mode Rostislav Lisovy
2014-10-09 8:26 ` Johannes Berg
2014-09-11 14:30 ` [PATCH 4/4] nl80211: " Rostislav Lisovy
2014-10-09 8:31 ` Johannes Berg [this message]
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=1412843479.1828.22.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=burak.simsek@volkswagen.de \
--cc=emmanuel.thierry@yogoko.fr \
--cc=jan-niklas.meier@volkswagen.de \
--cc=laszlo.virag@commsignia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lisovy@gmail.com \
--cc=rostislav.lisovy@fel.cvut.cz \
--cc=s.sander@nordsys.de \
--cc=sojkam1@fel.cvut.cz \
/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