From patchwork Thu Dec 18 18:13:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Oh X-Patchwork-Id: 5515681 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7D9DD9F1CD for ; Thu, 18 Dec 2014 18:14:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C4181202FE for ; Thu, 18 Dec 2014 18:13:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BF055202EC for ; Thu, 18 Dec 2014 18:13:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751150AbaLRSN5 (ORCPT ); Thu, 18 Dec 2014 13:13:57 -0500 Received: from sabertooth01.qualcomm.com ([65.197.215.72]:19930 "EHLO sabertooth01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751059AbaLRSN4 (ORCPT ); Thu, 18 Dec 2014 13:13:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1418926436; x=1450462436; h=from:to:cc:subject:date:message-id:mime-version; bh=mWTC3vx9gR+AdSwbWCp0+RXqdu5LIb2VBUpiuc8ei0Q=; b=BYHote+bZxkYq+N9y7hNFw1uM2m4sQOl99GgzN2yz6/yP+yPFHt2oADA 5cOsgFiNO8KT0fkh44qbLuWdiSQMU+EXuicbSeYx/7UnBDw0eK5QAhgqI +Mh4s/c52M5jlt6i3LsQZYuYMBKeurk99WHsu93ZmNiL5BZ0XYz8HiNM8 U=; X-IronPort-AV: E=McAfee;i="5600,1067,7656"; a="80267286" Received: from ironmsg02-lv.qualcomm.com ([10.47.202.183]) by sabertooth01.qualcomm.com with ESMTP; 18 Dec 2014 10:13:55 -0800 X-IronPort-AV: E=Sophos;i="5.07,601,1413270000"; d="scan'208";a="31328447" Received: from nasanexm01b.na.qualcomm.com ([10.85.0.82]) by ironmsg02-lv.qualcomm.com with ESMTP/TLS/RC4-SHA; 18 Dec 2014 10:13:55 -0800 Received: from poh-linux2.qualcomm.com (10.80.80.8) by NASANEXM01B.na.qualcomm.com (10.85.0.82) with Microsoft SMTP Server (TLS) id 15.0.913.22; Thu, 18 Dec 2014 10:13:54 -0800 From: Peter Oh To: CC: Subject: [PATCH] ath10k: set phymode to 11b when NO_OFDM flag set Date: Thu, 18 Dec 2014 10:13:00 -0800 Message-ID: <1418926380-22206-1-git-send-email-poh@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanexm01a.na.qualcomm.com (10.85.0.81) To NASANEXM01B.na.qualcomm.com (10.85.0.82) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable 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 phymode should use 11b only if NO_OFDM flags is set. Hence check up channel flag for NO_OFDM and set to 11b. Signed-off-by: Peter Oh --- drivers/net/wireless/ath/ath10k/mac.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 42f6a4d..c68beac 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -269,7 +269,10 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef) case IEEE80211_BAND_2GHZ: switch (chandef->width) { case NL80211_CHAN_WIDTH_20_NOHT: - phymode = MODE_11G; + if (chandef->chan->flags & IEEE80211_CHAN_NO_OFDM) + phymode = MODE_11B; + else + phymode = MODE_11G; break; case NL80211_CHAN_WIDTH_20: phymode = MODE_11NG_HT20;