From: Johannes Berg <johannes@sipsolutions.net>
To: Arik Nemtsov <arik@wizery.com>
Cc: linux-wireless@vger.kernel.org, Kalyan C Gaddam <chakkal@iit.edu>
Subject: Re: [PATCH 4/5] nl80211/mac80211: allow adding TDLS peers as stations
Date: Tue, 27 Sep 2011 13:55:53 +0200 [thread overview]
Message-ID: <1317124553.4082.26.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1317034493-5300-5-git-send-email-arik@wizery.com> (sfid-20110926_125521_419653_B5DAD54E)
On Mon, 2011-09-26 at 13:54 +0300, Arik Nemtsov wrote:
> @@ -811,6 +817,11 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
>
> sta_apply_parameters(local, sta, params);
>
> + if (!(wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) &&
> + (sta->flags & WLAN_STA_TDLS_PEER)) {
> + return -ENOTSUPP;
> + }
I think this should maybe also make sure that the interface is in
station mode? Otherwise it could get somewhat confusing. Also changes to
the TDLS flag probably shouldn't be allowed.
And this code might also be better in cfg80211, although this is only
with external management, right?
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -2521,18 +2521,18 @@ static int nl80211_set_station(struct sk_buff *skb, struct genl_info *info)
> break;
> case NL80211_IFTYPE_P2P_CLIENT:
> case NL80211_IFTYPE_STATION:
> - /* disallow everything but AUTHORIZED flag */
> + /* disallow things sta doesn't support */
> if (params.plink_action)
> err = -EINVAL;
> if (params.vlan)
> err = -EINVAL;
> - if (params.supported_rates)
> - err = -EINVAL;
Hmm. Should this be dependent on TLDS somehow?
> if (params.ht_capa)
> err = -EINVAL;
> if (params.listen_interval >= 0)
> err = -EINVAL;
> - if (params.sta_flags_mask & ~BIT(NL80211_STA_FLAG_AUTHORIZED))
> + if (params.sta_flags_mask &
> + ~(BIT(NL80211_STA_FLAG_AUTHORIZED) |
> + BIT(NL80211_STA_FLAG_TDLS_PEER)))
Why is the TDLS flag allowed to change?
> + /*
> + * Managed stations can only add TDLS peers, and only when the
> + * wiphy supports it.
> + */
> + if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_STATION &&
> + (!(params.sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) ||
> + !(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS)))
> return -EINVAL;
If the device does full TDLS by itself I don't think we should be
allowed to add/remove stations?
Maybe you need to describe the command sequences a little bit somewhere.
I'm getting a bad feeling about adding stations without supported rates,
and this is only when we have external management etc.
Part of your argument for having the frame sending etc. in the kernel
was that then it's more like managed mode, but all the manual station
handling is very much unlike that.
I'm beginning to think that maybe it should be handled through the TDLS
operations instead, more implicitly?
johannes
next prev parent reply other threads:[~2011-09-27 11:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-26 10:54 [PATCH 0/5] TDLS support for nl80211/mac80211 drivers Arik Nemtsov
2011-09-26 10:54 ` [PATCH 1/5] nl80211: support sending TDLS commands/frames Arik Nemtsov
2011-09-27 11:43 ` Johannes Berg
2011-09-26 10:54 ` [PATCH 2/5] mac80211: standardize adding supported rates IEs Arik Nemtsov
2011-09-27 11:46 ` Johannes Berg
2011-09-27 21:08 ` Arik Nemtsov
2011-09-26 10:54 ` [PATCH 3/5] mac80211: handle TDLS high-level commands and frames Arik Nemtsov
2011-09-27 11:50 ` Johannes Berg
2011-09-27 21:12 ` Arik Nemtsov
2011-09-26 10:54 ` [PATCH 4/5] nl80211/mac80211: allow adding TDLS peers as stations Arik Nemtsov
2011-09-27 11:55 ` Johannes Berg [this message]
2011-09-27 21:24 ` Arik Nemtsov
2011-09-26 10:54 ` [PATCH 5/5] mac80211: data path modification for TDLS peers 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=1317124553.4082.26.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=arik@wizery.com \
--cc=chakkal@iit.edu \
--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