From patchwork Fri Mar 9 18:15:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ganapathi Bhat X-Patchwork-Id: 10271595 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 15090603B5 for ; Fri, 9 Mar 2018 18:20:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 075E329FF9 for ; Fri, 9 Mar 2018 18:20:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 045C929C38; Fri, 9 Mar 2018 18:20:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1914129FE4 for ; Fri, 9 Mar 2018 18:20:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932443AbeCISUq (ORCPT ); Fri, 9 Mar 2018 13:20:46 -0500 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:59334 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932165AbeCISUZ (ORCPT ); Fri, 9 Mar 2018 13:20:25 -0500 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w29IJrZ7010287; Fri, 9 Mar 2018 10:20:24 -0800 Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2gfsxqy9a7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 09 Mar 2018 10:20:24 -0800 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 9 Mar 2018 10:20:22 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Fri, 9 Mar 2018 10:20:22 -0800 Received: from localhost (gbhat-thinkpad-t430.marvell.com [10.31.130.81]) by maili.marvell.com (Postfix) with ESMTP id AE8F83F7040; Fri, 9 Mar 2018 10:20:22 -0800 (PST) Received: from localhost.marvell.com (localhost [127.0.0.1]) by localhost (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id w29IFURU014933; Fri, 9 Mar 2018 23:45:30 +0530 Received: (from root@localhost) by localhost.marvell.com (8.14.4/8.14.4/Submit) id w29IFU0D014932; Fri, 9 Mar 2018 23:45:30 +0530 From: Ganapathi Bhat To: CC: Brian Norris , Cathy Luo , Xinming Hu , Zhiyuan Yang , James Cao , Mangesh Malusare , Ganapathi Bhat Subject: [PATCH 1/3] Revert "mwifiex: fix incorrect ht capability problem" Date: Fri, 9 Mar 2018 23:45:24 +0530 Message-ID: <1520619326-14888-2-git-send-email-gbhat@marvell.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1520619326-14888-1-git-send-email-gbhat@marvell.com> References: <1520619326-14888-1-git-send-email-gbhat@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-09_09:, , signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803090223 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit bcc920e8f08336cbbdcdba7c4449c27137e6b4b9. Drivers gets hardware info and updates ht_cap field of wiphy->bands during initialization. Once updated during init, ht_cap must not be modified as it reflects the capability supported by hardwawre. Above patch tries to modify the ht_cap field and this results in wrongly advertising capabilities during association. Signed-off-by: Cathy Luo Signed-off-by: Ganapathi Bhat --- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 44 +----------------------- 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c index a6077ab..ed66f12 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c @@ -146,7 +146,6 @@ int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv, size_t beacon_ie_len; struct mwifiex_bss_priv *bss_priv = (void *)bss->priv; const struct cfg80211_bss_ies *ies; - int ret; rcu_read_lock(); ies = rcu_dereference(bss->ies); @@ -190,48 +189,7 @@ int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv, if (bss_desc->cap_info_bitmap & WLAN_CAPABILITY_SPECTRUM_MGMT) bss_desc->sensed_11h = true; - ret = mwifiex_update_bss_desc_with_ie(priv->adapter, bss_desc); - if (ret) - return ret; - - /* Update HT40 capability based on current channel information */ - if (bss_desc->bcn_ht_oper && bss_desc->bcn_ht_cap) { - u8 ht_param = bss_desc->bcn_ht_oper->ht_param; - u8 radio = mwifiex_band_to_radio_type(bss_desc->bss_band); - struct ieee80211_supported_band *sband = - priv->wdev.wiphy->bands[radio]; - int freq = ieee80211_channel_to_frequency(bss_desc->channel, - radio); - struct ieee80211_channel *chan = - ieee80211_get_channel(priv->adapter->wiphy, freq); - - switch (ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) { - case IEEE80211_HT_PARAM_CHA_SEC_ABOVE: - if (chan->flags & IEEE80211_CHAN_NO_HT40PLUS) { - sband->ht_cap.cap &= - ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; - sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_40; - } else { - sband->ht_cap.cap |= - IEEE80211_HT_CAP_SUP_WIDTH_20_40 | - IEEE80211_HT_CAP_SGI_40; - } - break; - case IEEE80211_HT_PARAM_CHA_SEC_BELOW: - if (chan->flags & IEEE80211_CHAN_NO_HT40MINUS) { - sband->ht_cap.cap &= - ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; - sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_40; - } else { - sband->ht_cap.cap |= - IEEE80211_HT_CAP_SUP_WIDTH_20_40 | - IEEE80211_HT_CAP_SGI_40; - } - break; - } - } - - return 0; + return mwifiex_update_bss_desc_with_ie(priv->adapter, bss_desc); } void mwifiex_dnld_txpwr_table(struct mwifiex_private *priv)