From patchwork Wed Apr 18 13:44:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 153515 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id EDB4BB7050 for ; Wed, 18 Apr 2012 23:44:57 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 6CCAA9D1F1; Wed, 18 Apr 2012 09:44:52 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lzdYhfideCrJ; Wed, 18 Apr 2012 09:44:52 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 7F1229D201; Wed, 18 Apr 2012 09:44:08 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 5388B9D201 for ; Wed, 18 Apr 2012 09:44:06 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vIvk3CumWTLH for ; Wed, 18 Apr 2012 09:44:02 -0400 (EDT) Received: from wolverine01.qualcomm.com (wolverine01.qualcomm.com [199.106.114.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "wolverine01.qualcomm.com", Issuer "VeriSign Class 3 Secure Server CA" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 050AF9D203 for ; Wed, 18 Apr 2012 09:43:42 -0400 (EDT) X-IronPort-AV: E=McAfee;i="5400,1158,6684"; a="182757958" Received: from ironmsg04-l.qualcomm.com ([172.30.48.19]) by wolverine01.qualcomm.com with ESMTP; 18 Apr 2012 06:43:42 -0700 X-IronPort-AV: E=Sophos;i="4.75,438,1330934400"; d="scan'208";a="199392298" Received: from nasanexhc07.na.qualcomm.com ([172.30.39.190]) by Ironmsg04-L.qualcomm.com with ESMTP/TLS/AES128-SHA; 18 Apr 2012 06:43:41 -0700 Received: from qcmail1.qualcomm.com (172.30.39.5) by qcmail1.qualcomm.com (172.30.39.190) with Microsoft SMTP Server (TLS) id 14.2.283.3; Wed, 18 Apr 2012 06:43:40 -0700 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Wed, 18 Apr 2012 19:14:31 +0530 From: Rajkumar Manoharan To: Subject: [RFC 3/3] wpa_supplicant: Add configuration parameter for 2040coex Date: Wed, 18 Apr 2012 19:14:10 +0530 Message-ID: <1334756650-10624-3-git-send-email-rmanohar@qca.qualcomm.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1334756650-10624-1-git-send-email-rmanohar@qca.qualcomm.com> References: <1334756650-10624-1-git-send-email-rmanohar@qca.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [172.30.39.5] Cc: hostap@lists.shmoo.com X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com To enable 2040 coexistence report generation for 40MHz intolerance, use the following option in wpa_supplicant config file. report_2040coex=1 Signed-off-by: Rajkumar Manoharan --- wpa_supplicant/config.c | 3 ++- wpa_supplicant/config.h | 8 ++++++++ wpa_supplicant/config_file.c | 2 ++ wpa_supplicant/wpa_supplicant.c | 3 +++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index 2a166c7..ff3bf52 100644 --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -2871,7 +2871,8 @@ static const struct global_parse_data global_fields[] = { { INT_RANGE(disassoc_low_ack, 0, 1), 0 }, { INT_RANGE(interworking, 0, 1), 0 }, { FUNC(hessid), 0 }, - { INT_RANGE(access_network_type, 0, 15), 0 } + { INT_RANGE(access_network_type, 0, 15), 0 }, + { INT(report_2040coex), 0 } }; #undef FUNC diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h index 968f14b..bee3b21 100644 --- a/wpa_supplicant/config.h +++ b/wpa_supplicant/config.h @@ -602,6 +602,14 @@ struct wpa_config { * Homogeneous ESS. This is used only if interworking is enabled. */ u8 hessid[ETH_ALEN]; + + /** + * report_2040coex - Generate 2040 coexistence report + * + * Allow the station to generate 2040 coexistence report if any of + * 40 MHz intolerant AP found in the network. + */ + int report_2040coex; }; diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c index 671f7d6..ecb41bf 100644 --- a/wpa_supplicant/config_file.c +++ b/wpa_supplicant/config_file.c @@ -842,6 +842,8 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config) fprintf(f, "access_network_type=%d\n", config->access_network_type); #endif /* CONFIG_INTERWORKING */ + if (config->report_2040coex) + fprintf(f, "report_2040coex=%d\n", config->report_2040coex); } #endif /* CONFIG_NO_CONFIG_WRITE */ diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 5d4de3c..25827d5 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -3249,6 +3249,9 @@ void wpa_supplicant_proc_40mhz_intolerant(struct wpa_supplicant *wpa_s) u8 chan_list[P2P_MAX_CHANNELS], channel; u8 num_channels = 0, i; + if (!wpa_s->conf->report_2040coex) + return; + if (!wpa_s->current_bss || wpa_s->wpa_state != WPA_COMPLETED) return;