From patchwork Tue Nov 11 05:21:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Cameron X-Patchwork-Id: 5270571 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 926C4C11AC for ; Tue, 11 Nov 2014 05:21:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CE8A620158 for ; Tue, 11 Nov 2014 05:21:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6428C20142 for ; Tue, 11 Nov 2014 05:21:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751565AbaKKFVq (ORCPT ); Tue, 11 Nov 2014 00:21:46 -0500 Received: from zimbra.real-time.com ([63.170.91.9]:40154 "EHLO zimbra.real-time.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751316AbaKKFVq (ORCPT ); Tue, 11 Nov 2014 00:21:46 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.real-time.com (Postfix) with ESMTP id B07B8585F6F; Mon, 10 Nov 2014 23:21:44 -0600 (CST) X-Virus-Scanned: amavisd-new at mn.real-time.com Received: from zimbra.real-time.com ([127.0.0.1]) by localhost (zimbra.real-time.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eqGnCjGhWthN; Mon, 10 Nov 2014 23:21:40 -0600 (CST) Received: from esk.lan (unknown [101.175.207.253]) by zimbra.real-time.com (Postfix) with ESMTPSA id 1D484585F6E; Mon, 10 Nov 2014 23:21:40 -0600 (CST) Received: from james by esk.lan with local (Exim 4.80) (envelope-from ) id 1Xo3tQ-0004pv-2Y; Tue, 11 Nov 2014 16:21:28 +1100 Date: Tue, 11 Nov 2014 16:21:28 +1100 From: James Cameron To: linux-wireless@vger.kernel.org, Avinash Patil Subject: [PATCH] mwifiex: simplify ad hoc join capability info Message-ID: <20141111052127.GA18499@us.netrek.org> MIME-Version: 1.0 Content-Disposition: inline Organization: Netrek Vanilla Server Dictator User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While preparing an ad-hoc start command, the capability info bitmap is needlessly set from the command, and then the ESS bit cleared. Change to set the bitmap directly without reference to the command. Signed-off-by: James Cameron Acked-by: Amitkumar Karwar --- drivers/net/wireless/mwifiex/join.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c index 8d6c259..411a6c2 100644 --- a/drivers/net/wireless/mwifiex/join.c +++ b/drivers/net/wireless/mwifiex/join.c @@ -880,9 +880,7 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv, /* Set Capability info */ bss_desc->cap_info_bitmap |= WLAN_CAPABILITY_IBSS; - tmp_cap = le16_to_cpu(adhoc_start->cap_info_bitmap); - tmp_cap &= ~WLAN_CAPABILITY_ESS; - tmp_cap |= WLAN_CAPABILITY_IBSS; + tmp_cap = WLAN_CAPABILITY_IBSS; /* Set up privacy in bss_desc */ if (priv->sec_info.encryption_mode) {