From: Johannes Berg <johannes@sipsolutions.net>
To: Arend van Spriel <arend@broadcom.com>
Cc: Marcel Holtmann <marcel@holtmann.org>, linux-wireless@vger.kernel.org
Subject: Re: [RFC] cfg80211: Android P2P-Device workaround
Date: Wed, 24 Apr 2013 10:28:28 +0200 [thread overview]
Message-ID: <1366792108.11111.0.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <51779434.4010709@broadcom.com>
On Wed, 2013-04-24 at 10:13 +0200, Arend van Spriel wrote:
> If android is moving to 3.8 kernel with KLP (key lime pie), you could
> say that it requires middleware/wifi-framework to deal with the new
> kernel API. However, it mostly involves wpa_supplicant regardless of
> using it on android or not. So this is more a wpa_supplicant P2P hack.
There's no driver in 3.8 though that even uses P2P-Device. :-)
> >>> +#ifdef CONFIG_CFG80211_ANDROID_P2P_HACK
> >>> + || (wdev->iftype == NL80211_IFTYPE_P2P_DEVICE &&
> >>> + info->genlhdr->cmd != NL80211_CMD_SET_INTERFACE)
> >>> +#endif
> >>> + ) {
> >>> mutex_unlock(&cfg80211_mutex);
> >>> if (rtnl)
> >>> rtnl_unlock();
> >>
> >> And doing an #ifdef in the middle of if-clause doesn't ring any alarm
> >> bells that this might be a really bad idea ;)
> >
> > Well, I could put an #ifdef into each and every command instead which I
> > didn't want to, which incidentally is the reason for not allowing this
> > with WEXT, WEXT ioctls on the P2P-Device netdev just cause crashes :)
>
> I dislike these kind of constructs as well so I would like this to be
> made somewhat cleaner (conditional helper function?).
Actually I had to change it anyway, see the v2 patch, to fix a crash
when removing the p2p-device again.
johannes
next prev parent reply other threads:[~2013-04-24 8:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-23 12:45 [RFC] cfg80211: Android P2P-Device workaround Johannes Berg
2013-04-23 14:50 ` Marcel Holtmann
2013-04-23 16:42 ` Johannes Berg
2013-04-24 8:13 ` Arend van Spriel
2013-04-24 8:28 ` Johannes Berg [this message]
2013-04-24 8:31 ` Johannes Berg
2013-04-24 14:29 ` Marcel Holtmann
2013-04-25 9:03 ` Arend van Spriel
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=1366792108.11111.0.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=arend@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=marcel@holtmann.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).