]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - wl12xx/wl12xx.git/commitdiff
mac80211: mark the p2p0 interface with a special flag
authorArik Nemtsov <arik@wizery.com>
Sun, 5 Aug 2012 16:51:43 +0000 (19:51 +0300)
committerArik Nemtsov <arik@wizery.com>
Wed, 5 Sep 2012 14:48:11 +0000 (17:48 +0300)
This flag indicates the lower driver the interface will be used for
p2p management operations only (p2p find). This will be superseded
by pending upstream patches making p2p a wdev-only interface.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
include/net/mac80211.h
net/mac80211/iface.c

index 025e85fae9dc358eaa61186ca253a652019e9095..08228027f3167304ba4148f41631640d10d57dda 100644 (file)
@@ -863,6 +863,7 @@ struct ieee80211_channel_switch {
  * @addr: address of this interface
  * @p2p: indicates whether this AP or STA interface is a p2p
  *     interface, i.e. a GO or p2p-sta respectively
+ * @dummy_p2p: dummy p2p interface - not used for data
  * @drv_priv: data area for driver use, will always be aligned to
  *     sizeof(void *).
  */
@@ -871,6 +872,9 @@ struct ieee80211_vif {
        struct ieee80211_bss_conf bss_conf;
        u8 addr[ETH_ALEN];
        bool p2p;
+
+       bool dummy_p2p;
+
        /* must be last */
        u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *))));
 };
index e91af001f46d88ca11059d032b54d66164a7e669..6b51f8babfcb1ce80a30b8ba7cd6acc24c9db456 100644 (file)
@@ -1163,6 +1163,10 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
        memcpy(sdata->vif.addr, ndev->dev_addr, ETH_ALEN);
        memcpy(sdata->name, ndev->name, IFNAMSIZ);
 
+       /* hack for android */
+       if (0 == strcmp(sdata->name, "p2p0"))
+               sdata->vif.dummy_p2p = true;
+
        /* initialise type-independent data */
        sdata->wdev.wiphy = local->hw.wiphy;
        sdata->local = local;