From patchwork Fri Apr 19 15:37:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Stewart X-Patchwork-Id: 2466871 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 6B36ADF25A for ; Fri, 19 Apr 2013 20:01:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754091Ab3DSUBE (ORCPT ); Fri, 19 Apr 2013 16:01:04 -0400 Received: from mail-yh0-f74.google.com ([209.85.213.74]:59873 "EHLO mail-yh0-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753980Ab3DSUBD (ORCPT ); Fri, 19 Apr 2013 16:01:03 -0400 Received: by mail-yh0-f74.google.com with SMTP id q10so469746yhf.1 for ; Fri, 19 Apr 2013 13:01:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:date:subject:to:message-id:x-gm-message-state; bh=PMmjKnOSq1Ru9ASdwYdgKsaPBnbpPl+oft7yWD3S68w=; b=VqTfrHxMMwXcO5AicoQwErkjDj+L/JTh+VqKXnDCz/kh6QkcgYErhoLuNHKvcoZDrx XhjugAX4hK2ulaWtAMwTWa4jNWOmgvG4j5XC9qu9wjVPalU9+sGYnJNx4wjiraatc1ne u9HaGaiK/4FLxmRYVWJCjU9CD3UvmwfjOxOlIlUuEkULidO1tXlZeA2RQygt3dO+Kvxt TlO1fVXp++/jy5Pi5sJ2xaV7e1Y+PbIivnF/cosCSJSvXitV3P7wF1eGabFNs7zOgTXZ qLBkAWaBf93dpcDKuAfyPyg0my/DzRbpdjqj3P0ZI2tgHOgCKK/VqUDmC8AhRWR05uQO SZGQ== X-Received: by 10.236.128.237 with SMTP id f73mr8282913yhi.41.1366401194190; Fri, 19 Apr 2013 12:53:14 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id s80si3975694yhe.6.2013.04.19.12.53.14 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Fri, 19 Apr 2013 12:53:14 -0700 (PDT) Received: from clearcreek.mtv.corp.google.com (clearcreek.mtv.corp.google.com [172.22.73.104]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 0CB0E31C0F7 for ; Fri, 19 Apr 2013 12:53:14 -0700 (PDT) Received: by clearcreek.mtv.corp.google.com (Postfix, from userid 110058) id 9C63F200742; Fri, 19 Apr 2013 12:53:13 -0700 (PDT) From: Paul Stewart Date: Fri, 19 Apr 2013 08:37:46 -0700 Subject: [PATCH] mwifiex: Start P2P devices in P2P mode To: linux-wireless@vger.kernel.org Message-Id: <20130419195313.9C63F200742@clearcreek.mtv.corp.google.com> X-Gm-Message-State: ALoCoQnn4yHsQtR8JHO7VI247CEZ8xMrZxkmBS0Ff2a/N7ISFLyqGJFgdwkfrFGtduwzaZgTefeDeDNULrNJM4xxs4nxmkODaKAweEWHDXUGBwpaEKL8NX7Gq+6OpWi0hNhG8YFy/1NH/15wHPWArouBb3ZY1Qmc0AFZVTmE+xiYuh7bD7Vsy6F30hx6nx/Bqa+SiyTSeX09+7uT6tviY+ic/0GO+/hTmldDBi6BYN5oA//1x1j8N74= Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org p2p devices should identify themselves as such to userspace at startup, so the connection manager can decide which interface to start wpa_supplicant instances on. Signed-off-by: Paul Stewart Reviewed-by: Bing Zhao --- drivers/net/wireless/mwifiex/cfg80211.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 4701294..8c468c3 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c @@ -2136,10 +2136,9 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy, /* At start-up, wpa_supplicant tries to change the interface * to NL80211_IFTYPE_STATION if it is not managed mode. - * So, we initialize it to STA mode. */ - wdev->iftype = NL80211_IFTYPE_STATION; - priv->bss_mode = NL80211_IFTYPE_STATION; + wdev->iftype = NL80211_IFTYPE_P2P_CLIENT; + priv->bss_mode = NL80211_IFTYPE_P2P_CLIENT; /* Setting bss_type to P2P tells firmware that this interface * is receiving P2P peers found during find phase and doing