mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 3/4] cfg80211: Join and Leave handling for OCB mode
Date: Thu, 09 Oct 2014 10:26:52 +0200	[thread overview]
Message-ID: <1412843212.1828.17.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1410445822-6559-4-git-send-email-rostislav.lisovy@fel.cvut.cz> (sfid-20140911_163049_091317_F9C6D45E)

On Thu, 2014-09-11 at 16:30 +0200, Rostislav Lisovy wrote:
> Signed-off-by: Rostislav Lisovy <rostislav.lisovy@fel.cvut.cz>

A bit more commit log would be good :)

> +++ b/include/net/cfg80211.h
> @@ -375,6 +375,8 @@ static inline enum nl80211_channel_type
>  cfg80211_get_chandef_type(const struct cfg80211_chan_def *chandef)
>  {
>  	switch (chandef->width) {
> +	case NL80211_CHAN_WIDTH_5:
> +	case NL80211_CHAN_WIDTH_10:
>  	case NL80211_CHAN_WIDTH_20_NOHT:
>  		return NL80211_CHAN_NO_HT;

This is wrong, the old nl80211_channel_type simply cannot express a 5 or
10 MHz width - so this case should WARN() or something and really never
ever be called here.

Also, it doesn't really belong into this patch?

> +struct ocb_setup {
> +	struct cfg80211_chan_def chandef;
> +};

kernel-doc would be appreciated.

> @@ -892,6 +893,13 @@ cfg80211_get_chan_state(struct wireless_dev *wdev,
>  				*radar_detect |= BIT(wdev->chandef.width);
>  		}
>  		return;
> +	case NL80211_IFTYPE_OCB:
> +		if (wdev->chandef.chan) {
> +			*chan = wdev->chandef.chan;
> +			*chanmode = CHAN_MODE_EXCLUSIVE;
> +			return;
> +		}

same as in the mac80211 patch - I don't see why this should be
exclusive.

> +	WARN_ON(!setup->chandef.chan);

if (WARN_ON(...))
	return -EINVAL;

would be better

johannes


  reply	other threads:[~2014-10-09  8:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11 14:30 [PATCH 0/4] 802.11p " 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 [this message]
2014-09-11 14:30 ` [PATCH 4/4] nl80211: " Rostislav Lisovy
2014-10-09  8:31   ` 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=1412843212.1828.17.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

all inboxes | Powered by JetHome®