Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2514593pxf; Sun, 14 Mar 2021 01:13:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxblyEkEwM/WNUJ9kT118pZ4C/PXIKwC6YjrPZL+GfPKeHCdjkN94S1Heda6myIAZa1R5dK X-Received: by 2002:aa7:c0c7:: with SMTP id j7mr23801003edp.298.1615713236720; Sun, 14 Mar 2021 01:13:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615713236; cv=none; d=google.com; s=arc-20160816; b=Ij4kwyqwG7oYEW2b4dIHcpl3HerMJrGqQ2ArROfkk+GrnkBguhtazcKrgzURCttIfn J48J8kBknUnuWSrg+9hGaDI0Ku2wFY5oaPfmEvpflCP1HpEHOwyB/ZOAy/quMFwxofU5 yW1HxrGUE7KBM2oq9dIVqwK/W0sTEQcrw2CrlQ8pqTv6e472cem+dM+vVFA6FPKD4fl3 fLOtJbK/4Z5V5mTNz0JGmxp6el0JcRTLNpIxMVwVhBq8Si7cv80HMJrB6Ry08vgA1gHB BZYvQdsWr7ChMgIbVW18SbevnEwoPUTJLDCz5EyvABStgJvXgSs9UHZYLH7luJaneV9l myKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NM5ACNVlNsaeVilpuhcf3lEQy2OFRoK36i9tu3alhXc=; b=sr+fWimdTiBI/Co+OyBzoINNZ7OTzKF5H3rh93TGHcHlpzVBo8WFjUlh+E173Tcfgq hGj1VzG7LDPjJ6jIC64lOIldNf1uIsP/bnxJ7/2jBlIOWbepWKesroaPdrd0GQLbWg8P 4kT5pqPmb+otuBcs1Bzdh5jlYM21i7R+Wp3p5QNxPLYGOjfmHnrpYcRStmsB2l1K3OB+ msOw1xtzavwBNQRJSGljXAROX9eEmLxNJg1W8cjTbkonhO7OLlzqtkpaNQvS6IR4fqtZ mu3uPOohKGHsESmr4z90oet0JNSfBL+pXHqscLlGAp8ZaOmTp/gzxazWzAX+mfu01XZj +KVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ghriHR4E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v24si8566077eja.84.2021.03.14.01.13.34; Sun, 14 Mar 2021 01:13:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ghriHR4E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234990AbhCNJDs (ORCPT + 99 others); Sun, 14 Mar 2021 05:03:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233268AbhCNJDn (ORCPT ); Sun, 14 Mar 2021 05:03:43 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB412C061762 for ; Sun, 14 Mar 2021 01:03:42 -0800 (PST) Received: by mail-lj1-x22e.google.com with SMTP id f16so12616750ljm.1 for ; Sun, 14 Mar 2021 01:03:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NM5ACNVlNsaeVilpuhcf3lEQy2OFRoK36i9tu3alhXc=; b=ghriHR4ENRWqRC44nxpsrAnJjkiQK4VUUKB3i3jA376ctOUhDjxAyr1yZ8dy7QTtHR IuHAO2dQznkX7fLfR262fW+t5qwCVz16KIbDXyO8TxRJtsvj4DsA8rZScYVCEVZE5Z0m djHsiK7/+/9BmLKKT2oS+nEofn+9yiLm2/hoMiBtcMQNQ5Re0qaz+mIgfeFbeg61RgS2 BtKQaonOyU8YcE1tejOxYtL+Wbub93ZIe5KBtR9TBirzdj82xgok22VjmGwfe1qMnLYB /VCjf133g35FsSsfpYpP71Fnjq4b+sBbpCXIIptCFkOoCDg9g3Vnryti1UY4NmfPyaQo R67g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NM5ACNVlNsaeVilpuhcf3lEQy2OFRoK36i9tu3alhXc=; b=RkwMMxp8b5j1JTzcTTd/Q2LjWZPxY1Tx47HiZrmHTWDxuF3ZfieuXmJyCoOTFxA76B 75vATNmZLgiyK+61BTV9VJjTqzOMMbkVQSYzhNAiBN85ip0RhrPXm23mrmA4LldI0Tis hvHVDCcjj/rBpaHiPpnLWWUm+bSstt9MTpDF6vkmbT/rKYbsXRhmqiBr8vxwbFRe3Mcf 6h4dKVGZ2rjUWitU512eGPr5Gvo2ZvtNy6IQQarqDkukY2gFp9LYWdwYSM8ryWnN5ZUo cXL5b9pJqpJCWA5bvYgyE4FKsnSQEVGjjzarvcmo6aTsElt6weG3auVmMomf9s6Md6Jb EoAw== X-Gm-Message-State: AOAM533tgkwHmgc2+COY1Eq3ZmM38LbR7ekIfXcO7eGT/C985yQahhb0 PoLQvKbKafuEVNieW90eA74= X-Received: by 2002:a2e:7a08:: with SMTP id v8mr7486947ljc.344.1615712620284; Sun, 14 Mar 2021 01:03:40 -0800 (PST) Received: from alpha (10.177.smarthome.spb.ru. [109.71.177.10]) by smtp.gmail.com with ESMTPSA id e24sm2239743lfn.62.2021.03.14.01.03.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Mar 2021 01:03:39 -0800 (PST) Received: (nullmailer pid 21233 invoked by uid 1000); Sun, 14 Mar 2021 09:03:26 -0000 From: Ivan Safonov To: Larry Finger Cc: Greg Kroah-Hartman , Brooke Basile , "Gustavo A. R. Silva" , Michael Straube , Mrinal Pandey , Peilin Ye , Shreeya Patel , Simon Fong , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Ivan Safonov Subject: [PATCH 3/4] staging:r8188eu: replace cap_* definitions with native kernel WLAN_CAPABILITY_* Date: Sun, 14 Mar 2021 12:02:46 +0300 Message-Id: <20210314090247.21181-4-insafonov@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210314090247.21181-1-insafonov@gmail.com> References: <20210314090247.21181-1-insafonov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cap_* definitions duplicate WLAN_CAPABILITY_*. Remove cap_* definitions, improve code consistency. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 6 +++--- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 6 +++--- drivers/staging/rtl8188eu/include/wifi.h | 12 ------------ 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c index ec5b8be14c2b..7a706fe11750 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c @@ -223,13 +223,13 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv) /* capability info */ *(u16 *)ie = 0; - *(__le16 *)ie |= cpu_to_le16(cap_IBSS); + *(__le16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_IBSS); if (pregistrypriv->preamble == PREAMBLE_SHORT) - *(__le16 *)ie |= cpu_to_le16(cap_ShortPremble); + *(__le16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_SHORT_PREAMBLE); if (pdev_network->Privacy) - *(__le16 *)ie |= cpu_to_le16(cap_Privacy); + *(__le16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY); sz += 2; ie += 2; diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index bee19d5b22c0..50d3c3631be0 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -2188,7 +2188,7 @@ static void start_create_ibss(struct adapter *padapter) /* update capability */ caps = rtw_get_capability(pnetwork); update_capinfo(padapter, caps); - if (caps & cap_IBSS) {/* adhoc master */ + if (caps & WLAN_CAPABILITY_IBSS) {/* adhoc master */ val8 = 0xcf; rtw_hal_set_hwreg(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); @@ -2240,7 +2240,7 @@ static void start_clnt_join(struct adapter *padapter) /* update capability */ caps = rtw_get_capability(pnetwork); update_capinfo(padapter, caps); - if (caps & cap_ESS) { + if (caps & WLAN_CAPABILITY_ESS) { Set_MSR(padapter, WIFI_FW_STATION_STATE); val8 = (pmlmeinfo->auth_algo == dot11AuthAlgrthm_8021X) ? 0xcc : 0xcf; @@ -2258,7 +2258,7 @@ static void start_clnt_join(struct adapter *padapter) msecs_to_jiffies((REAUTH_TO * REAUTH_LIMIT) + (REASSOC_TO * REASSOC_LIMIT) + beacon_timeout)); pmlmeinfo->state = WIFI_FW_AUTH_NULL | WIFI_FW_STATION_STATE; - } else if (caps & cap_IBSS) { /* adhoc client */ + } else if (caps & WLAN_CAPABILITY_IBSS) { /* adhoc client */ Set_MSR(padapter, WIFI_FW_ADHOC_STATE); val8 = 0xcf; diff --git a/drivers/staging/rtl8188eu/include/wifi.h b/drivers/staging/rtl8188eu/include/wifi.h index f03359602db7..d65a0a88a69a 100644 --- a/drivers/staging/rtl8188eu/include/wifi.h +++ b/drivers/staging/rtl8188eu/include/wifi.h @@ -238,18 +238,6 @@ static inline int IsFrameTypeCtrl(unsigned char *pframe) #define AUTH_ODD_TO 0 #define AUTH_EVEN_TO 1 -#define cap_ESS BIT(0) -#define cap_IBSS BIT(1) -#define cap_CFPollable BIT(2) -#define cap_CFRequest BIT(3) -#define cap_Privacy BIT(4) -#define cap_ShortPremble BIT(5) -#define cap_PBCC BIT(6) -#define cap_ChAgility BIT(7) -#define cap_SpecMgmt BIT(8) -#define cap_QoSi BIT(9) -#define cap_ShortSlot BIT(10) - /*----------------------------------------------------------------------------- Below is the definition for 802.11i / 802.1x ------------------------------------------------------------------------------*/ -- 2.26.2