From nobody Sat Feb 7 15:40:10 2026 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FFFC2848B2 for ; Tue, 27 Jan 2026 20:04:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769544287; cv=none; b=UaPIEwE/U9lXfmiTbA8Ac3GGW3fFgSd8ZHLsFz9XFrNPc4zXCrzLePwtSc2BBqp6k8K73Ox3m1m1HV9QNmKkjVa1grYiTcFDWS7FXnC/N0Yw1631YYUQeWzH0lmJffuf9Z8D/gel107QfXR+pUPKexWfoLFVGaImtfgxXxq66l0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769544287; c=relaxed/simple; bh=DUj73dpWvUOs0SJwzs0brB8xwJyrnqPA8rObzZywce4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NPfokXVorv44CqnLrnS7ZnkQkZFsTU8lgD3SzmbjR2/6N7njCw4GsJKL6+MOeTjqylFudWbX8iGKOaMjRSLxkm+PgqkOUXdSa/NKjhAzbiVEz0ENE1n5MbRQTLqffei4ikxqFEGsRh2wahr+my+dh7MbcxYLfJF5fGDz7ufmD4k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dVz52v9Y; arc=none smtp.client-ip=209.85.210.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dVz52v9Y" Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-81f47610542so3256332b3a.0 for ; Tue, 27 Jan 2026 12:04:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769544284; x=1770149084; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xGjbMrQgBawKbwUUinu/j0+8frJya7hwRgmP5T/sjNw=; b=dVz52v9YS5nFKXTK9/QI2Tx9aTDdFTRn0i7i4TiFJgNqxmY8L5bBcdHSJA15g2G7rf GF/c3L5E84n+70YkP5AYKafczYAnmWnmorvVeyXBNIWctuaDjzOKJZSgnEBavVpYo/SY 3EnPt17A11BfTHSYVFN7qJ39Yrg+eeMPtj9TYoyMV7uIR10WDVmjlo9T+XfsqwRSuhgX eV0RZTEHN3EqOncGqYi+XmM29Rompo/IjFzR00H2xbgpkeEbQhmFoC9bohYsxJ6zss0W 2+w6amEs5Dw/lospBUvdfER9850w/G1RgavYbHdgt1ykcugZN6aaJKEjO1y+wwGH9hUj Ounw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769544284; x=1770149084; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=xGjbMrQgBawKbwUUinu/j0+8frJya7hwRgmP5T/sjNw=; b=jawRPhejlEhPgBWgGDz4PCeaEgEWyrrt5W1ouHyDaOErikRhFCcU3+VMdNi0Qls7Rw nvGmO7Jr+gZCak67BwP5fpuyKXdD29KfdwrLwn7P2mJ7Zc6Yvyn/HUmDrEtC5qBONxVO PXklMhOEamSc2TCqxwlOcV5BxlZiYBUJ9ww+zWeOeLT+NbUYgrLvEL2aiSh/CnCPtpGP Ga1P1/ARVo90ijMCb/onKRmatFtT3w5d3VW2E/xoBD5B1J0rmAfMBMkrc/EJp81qGt1S PcoJaB5XKf5XY4izIdsQKE+Xy8ax8q9W9vKhy9qUULzj5mI0Lqw6xwOd4It+pn3a5EbR +f1Q== X-Forwarded-Encrypted: i=1; AJvYcCVke95/2LlkYyzKGz/jXBoA5IbyuxrkjiKwTRt6PDBNnKifg80xh0JPvkYhk/0GSsNMqCjvwG/1r+9KVAM=@vger.kernel.org X-Gm-Message-State: AOJu0YyoR6ojqD5R7m+2g9dzS8alxafEWsH4kGFBkzcfexFSocE/TnjL pUFQKhVTvAMThvNpVsfUh6O5/ie1qYCkVo5s6m8eRQNiqEgrn+PuJG2H9lcLHg== X-Gm-Gg: AZuq6aKmK0bl3RgCzXrFYYHLKk7VFDMHB4X/1JWN23F4jH5XCCt5poh7jyB7A8oRB66 smiI0FPsu+MBkWM3Iv/l1mHgFppFxd55I8pBnDi85i2nXXc7sSl4zosksukHK6PqqZFNj6oxhtu ptWpf0hVrzUYZk/D9Q2BY/vJ2zvHxrpGxYOceeW5Cq5wxZ6ZGcgbRR4lOIUzhfdxyM3VD1e5E5/ Q2LeBruD8VSunB+k5A65XIWCSRdCXM+gugNJtVkePY0xbRnEAGfOt2xFPgobPYgC5IVdKe53Trg 5iEdYbJ6Hi2qK8iNKqTFjdJoS1vPvS/Tq6ZGBgBkOUvntyv4UdlPhKHVo/g8cpExwvoE2v2H8GZ fDvWpFCMpPj4HlUa4MbNHlowevRbt5tE4RB01KBQsiQ9Y7p88iRoskypu0V65fUP1HdWjRpUg0f KhVdteM/9EMCdr5LQb X-Received: by 2002:a05:6a00:1d86:b0:81f:41c8:765a with SMTP id d2e1a72fcca58-8236914c62cmr2980358b3a.4.1769544283631; Tue, 27 Jan 2026 12:04:43 -0800 (PST) Received: from snowman ([2401:4900:646d:9a6e:84d0:c92:d353:cd21]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82379b59e10sm377771b3a.25.2026.01.27.12.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 12:04:43 -0800 (PST) From: Khushal Chitturi To: gregkh@linuxfoundation.org Cc: dan.carpenter@linaro.org, straube.linux@gmail.com, hansg@kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Khushal Chitturi Subject: [PATCH v5 1/3] staging: rtl8723bs: simplify boolean expressions Date: Wed, 28 Jan 2026 01:34:25 +0530 Message-ID: <20260127200427.3669-2-khushalchitturi@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260127200427.3669-1-khushalchitturi@gmail.com> References: <20260127200427.3669-1-khushalchitturi@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Simplify boolean expressions in rtw_xmit.c to comply with the kernel coding style Signed-off-by: Khushal Chitturi --- Changelog: v4 -> v5: Rebased onto current staging-testing. v3 -> v4: Fixed alignment and removed extra parentheses. v2 -> v3: Resubmitted as a versioned series to avoid threading confusion. v1 -> v2: Corrected commit messages. drivers/staging/rtl8723bs/core/rtw_xmit.c | 40 ++++++++++++----------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rt= l8723bs/core/rtw_xmit.c index 9cead1455bfa..314027ea79a4 100644 --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c @@ -384,8 +384,9 @@ static void update_attrib_vcs_info(struct adapter *pada= pter, struct xmit_frame * } else { while (true) { /* IOT action */ - if ((pmlmeinfo->assoc_AP_vendor =3D=3D HT_IOT_PEER_ATHEROS) && (pattrib= ->ampdu_en =3D=3D true) && - (padapter->securitypriv.dot11PrivacyAlgrthm =3D=3D _AES_)) { + if (pmlmeinfo->assoc_AP_vendor =3D=3D HT_IOT_PEER_ATHEROS && + pattrib->ampdu_en && + padapter->securitypriv.dot11PrivacyAlgrthm =3D=3D _AES_) { pattrib->vcs_mode =3D CTS_TO_SELF; break; } @@ -420,7 +421,7 @@ static void update_attrib_vcs_info(struct adapter *pada= pter, struct xmit_frame * /* to do list: check MIMO power save condition. */ =20 /* check AMPDU aggregation for TXOP */ - if (pattrib->ampdu_en =3D=3D true) { + if (pattrib->ampdu_en) { pattrib->vcs_mode =3D RTS_CTS; break; } @@ -482,10 +483,10 @@ static s32 update_attrib_sec_info(struct adapter *pad= apter, struct pkt_attrib *p memset(pattrib->dot11tkiptxmickey.skey, 0, 16); pattrib->mac_id =3D psta->mac_id; =20 - if (psta->ieee8021x_blocked =3D=3D true) { + if (psta->ieee8021x_blocked) { pattrib->encrypt =3D 0; =20 - if ((pattrib->ether_type !=3D 0x888e) && (check_fwstate(pmlmepriv, WIFI_= MP_STATE) =3D=3D false)) { + if (pattrib->ether_type !=3D 0x888e && !check_fwstate(pmlmepriv, WIFI_MP= _STATE)) { res =3D _FAIL; goto exit; } @@ -639,8 +640,8 @@ static s32 update_attrib(struct adapter *padapter, stru= ct sk_buff *pkt, struct p memcpy(pattrib->dst, ðerhdr.h_dest, ETH_ALEN); memcpy(pattrib->src, ðerhdr.h_source, ETH_ALEN); =20 - if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) =3D=3D true) || - (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) =3D=3D true)) { + if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) || + check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) { memcpy(pattrib->ra, pattrib->dst, ETH_ALEN); memcpy(pattrib->ta, pattrib->src, ETH_ALEN); } else if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) { @@ -704,7 +705,8 @@ static s32 update_attrib(struct adapter *padapter, stru= ct sk_buff *pkt, struct p if (!psta) { /* if we cannot get psta =3D> drop the pkt */ res =3D _FAIL; goto exit; - } else if ((check_fwstate(pmlmepriv, WIFI_AP_STATE) =3D=3D true) && (!(p= sta->state & _FW_LINKED))) { + } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) && + !(psta->state & _FW_LINKED)) { res =3D _FAIL; goto exit; } @@ -881,7 +883,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr,= struct pkt_attrib *pattr SetFrameSubType(fctrl, pattrib->subtype); =20 if (pattrib->subtype & WIFI_DATA_TYPE) { - if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) =3D=3D true) { + if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) { /* to_ds =3D 1, fr_ds =3D 0; */ =20 { @@ -895,7 +897,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr,= struct pkt_attrib *pattr =20 if (pqospriv->qos_option) qos_option =3D true; - } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) =3D=3D true) { + } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { /* to_ds =3D 0, fr_ds =3D 1; */ SetFrDs(fctrl); memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); @@ -904,8 +906,8 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr,= struct pkt_attrib *pattr =20 if (pattrib->qos_en) qos_option =3D true; - } else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) =3D=3D true) || - (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) =3D=3D true)) { + } else if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) || + check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) { memcpy(pwlanhdr->addr1, pattrib->dst, ETH_ALEN); memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN); memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN); @@ -963,7 +965,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr,= struct pkt_attrib *pattr pattrib->ampdu_en =3D true; =20 /* re-check if enable ampdu by BA_starting_seqctrl */ - if (pattrib->ampdu_en =3D=3D true) { + if (pattrib->ampdu_en) { u16 tx_seq; =20 tx_seq =3D psta->BA_starting_seqctrl[pattrib->priority & 0x0f]; @@ -1114,7 +1116,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, = struct sk_buff *pkt, struct =20 frg_inx++; =20 - if (bmcst || (rtw_endofpktfile(&pktfile) =3D=3D true)) { + if (bmcst || rtw_endofpktfile(&pktfile)) { pattrib->nr_frags =3D frg_inx; =20 pattrib->last_txcmdsz =3D pattrib->hdrlen + pattrib->iv_len + @@ -1140,7 +1142,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, = struct sk_buff *pkt, struct =20 xmitframe_swencrypt(padapter, pxmitframe); =20 - if (bmcst =3D=3D false) + if (!bmcst) update_attrib_vcs_info(padapter, pxmitframe); else pattrib->vcs_mode =3D NONE_VCS; @@ -1977,14 +1979,14 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_bu= ff **ppkt) do_queue_select(padapter, &pxmitframe->attrib); =20 spin_lock_bh(&pxmitpriv->lock); - if (xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe) =3D=3D true)= { + if (xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe)) { spin_unlock_bh(&pxmitpriv->lock); return 1; } spin_unlock_bh(&pxmitpriv->lock); =20 /* pre_xmitframe */ - if (rtw_hal_xmit(padapter, pxmitframe) =3D=3D false) + if (!rtw_hal_xmit(padapter, pxmitframe)) return 1; =20 return 0; @@ -2028,7 +2030,7 @@ signed int xmitframe_enqueue_for_sleeping_sta(struct = adapter *padapter, struct x signed int bmcst =3D is_multicast_ether_addr(pattrib->ra); bool update_tim =3D false; =20 - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) =3D=3D false) + if (!check_fwstate(pmlmepriv, WIFI_AP_STATE)) return ret; psta =3D rtw_get_stainfo(&padapter->stapriv, pattrib->ra); if (pattrib->psta !=3D psta) @@ -2153,7 +2155,7 @@ static void dequeue_xmitframes_to_sleeping_queue(stru= ct adapter *padapter, struc =20 ret =3D xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe); =20 - if (true =3D=3D ret) { + if (ret) { ptxservq =3D rtw_get_sta_pending(padapter, psta, pattrib->priority, (u8= *)(&ac_index)); =20 ptxservq->qcnt--; --=20 2.52.0 From nobody Sat Feb 7 15:40:10 2026 Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4D9E2848B2 for ; Tue, 27 Jan 2026 20:04:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769544292; cv=none; b=LeazBYkT4xvLE1n7XEzr73oHzHtk2HUEwfuiIdJAkYwhFhcQEUFCg7XxNO7KRdT2w/6VNMmdUvDcbzYGCE/KmtABkS6U6FDNE8+eQ6gdIIhDWfMYjR3oj+rOE+IypblYZxn/LLPWa1eqhv3iFdSpIx4tWxmAX8Z9Oa+KKC8KmlM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769544292; c=relaxed/simple; bh=iiEpqBynb5Dqs0OFPTT2ePdjz8CI+40vNlKNuYrUvUs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hn3yu+1+Ldc+cO6vm3729CmgiQzkOe/FQ2ncHvpd/FKuM8F6oFPAn34f5CuBMpbUlO+XF2xYc7qVBdCcYFhgrdmiEYQne46UpqCI3yOmbBx/Fm20RT4Y7M93iRTOoZz2X9iPuNygcXEPlqoH3bMeWX1abHrbT7PzJJ3X8KSa5yI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Jg9Sv+d1; arc=none smtp.client-ip=209.85.210.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Jg9Sv+d1" Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-81e8a9d521dso3585724b3a.2 for ; Tue, 27 Jan 2026 12:04:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769544290; x=1770149090; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=44FJ2lRoW81kO/4ElkNFmQLs9545Q+Fh1IjM7HnIq0k=; b=Jg9Sv+d1u7bRLFU9g5kWrOix6o1PCBlHzJWvRq3Pt1RjcGLd+zVkcAtJwG288U6++n inGVUdgPnslEj2m2ySCJLAqXKaBiNp7N/s7bB5tRrgIDGDx/bRrbT0QIHXceC3pf7/TB pxStNFRBm5nPFplAGOBgerSliSDFOQTM0ExrFQBDAPNPDpM4V3cYS49AKIAWTY3SpX+8 TStvzBb4Hin2THIvCv4x/Ja6cVOilkEnOUjaZ5JH5SUCw4oJrAmRqL5me2jmxGJPPm3i 5fWoe/fXp+sXax4PuPk30vn1Pf7BFo3WQW7pC52/wBKScqz9SYmb7eesCvtwo2K4qH06 T/IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769544290; x=1770149090; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=44FJ2lRoW81kO/4ElkNFmQLs9545Q+Fh1IjM7HnIq0k=; b=gko2anMX/O25ND1iiD+AwsT20dny42R1bhRG0hFAblYS9JCJhg2C0oER834taoDTSl tp82Lpi13+hNzq/HlRf8BHoYZ+66UfyteHXDESr9dFEobblSQoLpQkCaS7moaUBtz+Yp rzqiUZ25otVgHBZZQl82t71NpvGCOA91elu0hpJL91l41Wt0mH1zos4qjvW5sjqeZrVr 59cB1AqlJ0GFbdo0os+GJh0TWrEJFlJrEmFK92Cs+reMW9OHTigCV1lR+R1tWenT5jbs HlO3NWaC+GJwVFijTuioAvTnJsRI30FB4934kjIjFsrxO9Px8oaeuFluujn1HfLnseYZ ru/w== X-Forwarded-Encrypted: i=1; AJvYcCUTPGscu4CnVko8LGXwpzSbnqwzEQ4DRzAI9pZoG9YkjTIsJmK7kQ7qGe0W+O63vVAF2X7LGZHkk9RAWhA=@vger.kernel.org X-Gm-Message-State: AOJu0YyNt8azstWPp7ZN+WJD2rZlFwQPS2yKk1U8dUOgrDlt1810qBzw pGBfjGtUEIFclmeoszC6AXkFRJrQFUaDUSeo+U3EjcgT8FEVZ7Kzyo/m X-Gm-Gg: AZuq6aJkX5XNFj5YYkSfXMdXXlyIWNzwVMA2uE0feKwZtfCthrGhaRsBgvfCr4cV1Xc 8pXHCpLWAzJco9SGt0KC/ccl3TSsC/wbuZ3nnRFnRRFw5Sr2ckD+6dvJI2uzKte3lBlw5OaKQW5 phw3pgRYoP8ohCnMGGMfn3u4jGA2sFhw9Wlqf8aQhlceGS3kWD29SmTtdArHGcWpvd0ncdD7qVt IAd9vn2pTDBfFXhsbVChRG/YAtDGBPmdwDSzYoCD1cR68oIpjmQ9I12R1QZoP81d6yBi8h7eSY3 xizknWwoQ7cIzlRnwpLe+cNql6SmUBaBsDGnpfu3+q4TulCVv/v43n19ViALwcSuZzoxmNPmZnW MFEaBcopDsqR9131YyqVMsT0fMmPf3TVi5ovyIGEyh8nFA7FGuVHSIsXwTWjm4eCvTku9EdRWti h61Tk4sCwMwZadsBiG/iqDgdOfJcE= X-Received: by 2002:a05:6a00:b95:b0:81c:717b:9d2f with SMTP id d2e1a72fcca58-8236914658fmr2970117b3a.5.1769544289940; Tue, 27 Jan 2026 12:04:49 -0800 (PST) Received: from snowman ([2401:4900:646d:9a6e:84d0:c92:d353:cd21]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82379b59e10sm377771b3a.25.2026.01.27.12.04.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 12:04:49 -0800 (PST) From: Khushal Chitturi To: gregkh@linuxfoundation.org Cc: dan.carpenter@linaro.org, straube.linux@gmail.com, hansg@kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Khushal Chitturi Subject: [PATCH v5 2/3] staging: rtl8723bs: rename LinkDetectInfo and clean up related code Date: Wed, 28 Jan 2026 01:34:26 +0530 Message-ID: <20260127200427.3669-3-khushalchitturi@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260127200427.3669-1-khushalchitturi@gmail.com> References: <20260127200427.3669-1-khushalchitturi@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This patch renames LinkDetectInfo instance to link_detect_info and updates the fields of rt_link_detect_t to follow kernel naming conventions. Local variables in traffic_status_watchdog were also updated for consistency. Related checkpatch.pl warnings triggered by the rename were also fixed. Signed-off-by: Khushal Chitturi --- Changelog: v4 -> v5: Rebased onto current staging-testing. v3 -> v4: Narrow rename scope to affect link detection, and adjusted formatting. v2 -> v3: Resubmitted as a versioned series. v1 -> v2: Corrected commit messages. drivers/staging/rtl8723bs/core/rtw_cmd.c | 103 ++++++++++-------- .../staging/rtl8723bs/core/rtw_ioctl_set.c | 15 +-- drivers/staging/rtl8723bs/core/rtw_mlme.c | 16 +-- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 10 +- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 2 +- drivers/staging/rtl8723bs/core/rtw_recv.c | 4 +- drivers/staging/rtl8723bs/core/rtw_xmit.c | 2 +- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 6 +- .../staging/rtl8723bs/hal/rtl8723bs_xmit.c | 4 +- drivers/staging/rtl8723bs/include/rtw_mlme.h | 31 ++++-- .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 8 +- 12 files changed, 108 insertions(+), 95 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl= 8723bs/core/rtw_cmd.c index 27da987d881f..64d98761cdf3 100644 --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c @@ -1130,12 +1130,16 @@ static void collect_traffic_statistics(struct adapt= er *padapter) =20 u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer) { - u8 bEnterPS =3D false; - u16 BusyThresholdHigh =3D 25; - u16 BusyThresholdLow =3D 10; - u16 BusyThreshold =3D BusyThresholdHigh; - u8 bBusyTraffic =3D false, bTxBusyTraffic =3D false, bRxBusyTraffic =3D f= alse; - u8 bHigherBusyTraffic =3D false, bHigherBusyRxTraffic =3D false, bHigherB= usyTxTraffic =3D false; + bool should_enter_ps =3D false; + u16 busy_threshold_high =3D 25; + u16 busy_threshold_low =3D 10; + u16 busy_threshold =3D busy_threshold_high; + bool busy_traffic =3D false; + bool tx_busy_traffic =3D false; + bool rx_busy_traffic =3D false; + bool higher_busy_traffic =3D false; + bool higher_busy_rx_traffic =3D false; + bool higher_busy_tx_traffic =3D false; struct mlme_priv *pmlmepriv =3D &padapter->mlmepriv; =20 collect_traffic_statistics(padapter); @@ -1145,57 +1149,61 @@ u8 traffic_status_watchdog(struct adapter *padapter= , u8 from_timer) /* */ if ((check_fwstate(pmlmepriv, _FW_LINKED)) /*&& !MgntInitAdapterInProgress(pMgntInfo)*/) { - /* if we raise bBusyTraffic in last watchdog, using lower threshold. */ - if (pmlmepriv->LinkDetectInfo.bBusyTraffic) - BusyThreshold =3D BusyThresholdLow; + /* if we raise busy_traffic in last watchdog, using lower threshold. */ + if (pmlmepriv->link_detect_info.busy_traffic) + busy_threshold =3D busy_threshold_low; =20 - if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > BusyThreshold || - pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > BusyThreshold) { - bBusyTraffic =3D true; + if (pmlmepriv->link_detect_info.num_rx_ok_in_period > busy_threshold || + pmlmepriv->link_detect_info.num_tx_ok_in_period > busy_threshold) { + busy_traffic =3D true; =20 - if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > pmlmepriv->LinkDetectIn= fo.NumTxOkInPeriod) - bRxBusyTraffic =3D true; + if (pmlmepriv->link_detect_info.num_rx_ok_in_period > + pmlmepriv->link_detect_info.num_tx_ok_in_period) + rx_busy_traffic =3D true; else - bTxBusyTraffic =3D true; + tx_busy_traffic =3D true; } =20 /* Higher Tx/Rx data. */ - if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > 4000 || - pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > 4000) { - bHigherBusyTraffic =3D true; + if (pmlmepriv->link_detect_info.num_rx_ok_in_period > 4000 || + pmlmepriv->link_detect_info.num_tx_ok_in_period > 4000) { + higher_busy_traffic =3D true; =20 - if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > pmlmepriv->LinkDetectIn= fo.NumTxOkInPeriod) - bHigherBusyRxTraffic =3D true; + if (pmlmepriv->link_detect_info.num_rx_ok_in_period > + pmlmepriv->link_detect_info.num_tx_ok_in_period) + higher_busy_rx_traffic =3D true; else - bHigherBusyTxTraffic =3D true; + higher_busy_tx_traffic =3D true; } =20 /* check traffic for powersaving. */ - if (((pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod + pmlmepriv->Link= DetectInfo.NumTxOkInPeriod) > 8) || - (pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 2)) { - bEnterPS =3D false; + if ((pmlmepriv->link_detect_info.num_rx_unicast_ok_in_period + + pmlmepriv->link_detect_info.num_tx_ok_in_period) > 8 || + pmlmepriv->link_detect_info.num_rx_unicast_ok_in_period > 2) { + should_enter_ps =3D false; =20 - if (bBusyTraffic) { - if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount <=3D 4) - pmlmepriv->LinkDetectInfo.TrafficTransitionCount =3D 4; + if (busy_traffic) { + if (pmlmepriv->link_detect_info.traffic_transition_count <=3D 4) + pmlmepriv->link_detect_info.traffic_transition_count =3D 4; =20 - pmlmepriv->LinkDetectInfo.TrafficTransitionCount++; + pmlmepriv->link_detect_info.traffic_transition_count++; =20 - if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount > 30/*TrafficTran= sitionLevel*/) - pmlmepriv->LinkDetectInfo.TrafficTransitionCount =3D 30; + /* Check if traffic transition count exceeds the threshold */ + if (pmlmepriv->link_detect_info.traffic_transition_count > 30) + pmlmepriv->link_detect_info.traffic_transition_count =3D 30; } } else { - if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount >=3D 2) - pmlmepriv->LinkDetectInfo.TrafficTransitionCount -=3D 2; + if (pmlmepriv->link_detect_info.traffic_transition_count >=3D 2) + pmlmepriv->link_detect_info.traffic_transition_count -=3D 2; else - pmlmepriv->LinkDetectInfo.TrafficTransitionCount =3D 0; + pmlmepriv->link_detect_info.traffic_transition_count =3D 0; =20 - if (pmlmepriv->LinkDetectInfo.TrafficTransitionCount =3D=3D 0) - bEnterPS =3D true; + if (pmlmepriv->link_detect_info.traffic_transition_count =3D=3D 0) + should_enter_ps =3D true; } =20 /* LeisurePS only work in infra mode. */ - if (bEnterPS) { + if (should_enter_ps) { if (!from_timer) LPS_Enter(padapter, "TRAFFIC_IDLE"); } else { @@ -1215,17 +1223,18 @@ u8 traffic_status_watchdog(struct adapter *padapter= , u8 from_timer) LPS_Leave(padapter, "NON_LINKED"); } =20 - pmlmepriv->LinkDetectInfo.NumRxOkInPeriod =3D 0; - pmlmepriv->LinkDetectInfo.NumTxOkInPeriod =3D 0; - pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod =3D 0; - pmlmepriv->LinkDetectInfo.bBusyTraffic =3D bBusyTraffic; - pmlmepriv->LinkDetectInfo.bTxBusyTraffic =3D bTxBusyTraffic; - pmlmepriv->LinkDetectInfo.bRxBusyTraffic =3D bRxBusyTraffic; - pmlmepriv->LinkDetectInfo.bHigherBusyTraffic =3D bHigherBusyTraffic; - pmlmepriv->LinkDetectInfo.bHigherBusyRxTraffic =3D bHigherBusyRxTraffic; - pmlmepriv->LinkDetectInfo.bHigherBusyTxTraffic =3D bHigherBusyTxTraffic; - - return bEnterPS; + pmlmepriv->link_detect_info.num_rx_ok_in_period =3D 0; + pmlmepriv->link_detect_info.num_tx_ok_in_period =3D 0; + pmlmepriv->link_detect_info.num_rx_unicast_ok_in_period =3D 0; + pmlmepriv->link_detect_info.busy_traffic =3D busy_traffic; + pmlmepriv->link_detect_info.tx_busy_traffic =3D tx_busy_traffic; + pmlmepriv->link_detect_info.rx_busy_traffic =3D rx_busy_traffic; + pmlmepriv->link_detect_info.higher_busy_traffic =3D higher_busy_traffic; + pmlmepriv->link_detect_info.higher_busy_rx_traffic =3D higher_busy_rx_tra= ffic; + pmlmepriv->link_detect_info.higher_busy_tx_traffic =3D higher_busy_tx_tra= ffic; + + return should_enter_ps; + } =20 static void dynamic_chk_wk_hdl(struct adapter *padapter) diff --git a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c b/drivers/stagi= ng/rtl8723bs/core/rtw_ioctl_set.c index 587a87fbffeb..b190cb1392a0 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c +++ b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c @@ -61,9 +61,7 @@ u8 rtw_do_join(struct adapter *padapter) /* when set_ssid/set_bssid for rtw_do_join(), but scanning queue is empt= y */ /* we try to issue sitesurvey firstly */ =20 - if (pmlmepriv->LinkDetectInfo.bBusyTraffic =3D=3D false - || rtw_to_roam(padapter) > 0 - ) { + if (!pmlmepriv->link_detect_info.busy_traffic || rtw_to_roam(padapter) >= 0) { /* submit site_survey_cmd */ ret =3D rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0= ); if (ret !=3D _SUCCESS) @@ -113,9 +111,8 @@ u8 rtw_do_join(struct adapter *padapter) =20 /* when set_ssid/set_bssid for rtw_do_join(), but there are no desired= bss in scanning queue */ /* we try to issue sitesurvey firstly */ - if (pmlmepriv->LinkDetectInfo.bBusyTraffic =3D=3D false - || rtw_to_roam(padapter) > 0 - ) { + if (!pmlmepriv->link_detect_info.busy_traffic || + rtw_to_roam(padapter) > 0) { ret =3D rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL,= 0); if (ret !=3D _SUCCESS) pmlmepriv->to_join =3D false; @@ -374,13 +371,13 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter *pad= apter, struct ndis_802_11_s res =3D false; goto exit; } - if (padapter->hw_init_completed =3D=3D false) { + if (!padapter->hw_init_completed) { res =3D false; goto exit; } =20 - if ((check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) =3D=3D = true) || - (pmlmepriv->LinkDetectInfo.bBusyTraffic =3D=3D true)) { + if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING) || + pmlmepriv->link_detect_info.busy_traffic) { /* Scan or linking is in progress, do nothing. */ res =3D true; =20 diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rt= l8723bs/core/rtw_mlme.c index 8e1e1c97f0c4..459f19e3b7fe 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c @@ -1185,8 +1185,8 @@ void rtw_joinbss_event_prehandle(struct adapter *adap= ter, u8 *pbuf) =20 spin_lock_bh(&pmlmepriv->lock); =20 - pmlmepriv->LinkDetectInfo.TrafficTransitionCount =3D 0; - pmlmepriv->LinkDetectInfo.LowPowerTransitionCount =3D 0; + pmlmepriv->link_detect_info.traffic_transition_count =3D 0; + pmlmepriv->link_detect_info.low_power_transition_count =3D 0; =20 if (pnetwork->join_res > 0) { spin_lock_bh(&pmlmepriv->scanned_queue.lock); @@ -1627,7 +1627,7 @@ static void rtw_auto_scan_handler(struct adapter *pad= apter) if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING)) goto exit; =20 - if (pmlmepriv->LinkDetectInfo.bBusyTraffic) + if (pmlmepriv->link_detect_info.busy_traffic) goto exit; } =20 @@ -1655,12 +1655,12 @@ void rtw_dynamic_check_timer_handler(struct adapter= *adapter) if ((adapter_to_pwrctl(adapter)->fw_current_in_ps_mode) && !(hal_btcoex_IsBtControlLps(adapter)) ) { - u8 bEnterPS; + bool should_enter_ps; =20 linked_status_chk(adapter); =20 - bEnterPS =3D traffic_status_watchdog(adapter, 1); - if (bEnterPS) { + should_enter_ps =3D traffic_status_watchdog(adapter, 1); + if (should_enter_ps) { /* rtw_lps_ctrl_wk_cmd(adapter, LPS_CTRL_ENTER, 1); */ rtw_hal_dm_watchdog_in_lps(adapter); } else { @@ -2517,8 +2517,8 @@ void rtw_issue_addbareq_cmd(struct adapter *padapter,= struct xmit_frame *pxmitfr struct pkt_attrib *pattrib =3D &pxmitframe->attrib; s32 bmcst =3D is_multicast_ether_addr(pattrib->ra); =20 - /* if (bmcst || (padapter->mlmepriv.LinkDetectInfo.bTxBusyTraffic =3D=3D = false)) */ - if (bmcst || (padapter->mlmepriv.LinkDetectInfo.NumTxOkInPeriod < 100)) + /* if (bmcst || (padapter->mlmepriv.link_detect_info.tx_busy_traffic =3D= =3D false)) */ + if (bmcst || (padapter->mlmepriv.link_detect_info.num_tx_ok_in_period < 1= 00)) return; =20 priority =3D pattrib->priority; diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/stagin= g/rtl8723bs/core/rtw_mlme_ext.c index 884fcce50d9c..8eafb929938c 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c @@ -1522,7 +1522,7 @@ unsigned int OnDeAuth(struct adapter *padapter, union= recv_frame *precv_frame) if (ignore_received_deauth =3D=3D 0) receive_disconnect(padapter, GetAddr3Ptr(pframe), reason); =20 - pmlmepriv->LinkDetectInfo.bBusyTraffic =3D false; + pmlmepriv->link_detect_info.busy_traffic =3D false; return _SUCCESS; } =20 @@ -1574,7 +1574,7 @@ unsigned int OnDisassoc(struct adapter *padapter, uni= on recv_frame *precv_frame) =20 receive_disconnect(padapter, GetAddr3Ptr(pframe), reason); =20 - pmlmepriv->LinkDetectInfo.bBusyTraffic =3D false; + pmlmepriv->link_detect_info.busy_traffic =3D false; return _SUCCESS; =20 } @@ -4776,9 +4776,9 @@ static void rtw_mlmeext_disconnect(struct adapter *pa= dapter) =20 timer_delete_sync(&pmlmeext->link_timer); =20 - /* pmlmepriv->LinkDetectInfo.TrafficBusyState =3D false; */ - pmlmepriv->LinkDetectInfo.TrafficTransitionCount =3D 0; - pmlmepriv->LinkDetectInfo.LowPowerTransitionCount =3D 0; + /* pmlmepriv->link_detect_info.TrafficBusyState =3D false; */ + pmlmepriv->link_detect_info.traffic_transition_count =3D 0; + pmlmepriv->link_detect_info.low_power_transition_count =3D 0; =20 } =20 diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging= /rtl8723bs/core/rtw_pwrctrl.c index 0ef788abf403..5fab7b32d4d4 100644 --- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c @@ -210,7 +210,7 @@ void traffic_check_for_leave_lps(struct adapter *padapt= er, u8 tx, u32 tx_packets } =20 } else { /* from rx path */ - if (pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 4/*2*/) { + if (pmlmepriv->link_detect_info.num_rx_unicast_ok_in_period > 4/*2*/) { if (adapter_to_pwrctl(padapter)->bLeisurePs && (adapter_to_pwrctl(padapter)->pwr_mode !=3D PS_MODE_ACTIVE) && !(hal_btcoex_IsBtControlLps(padapter))) diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rt= l8723bs/core/rtw_recv.c index 0a8725686721..80d0c5884a2a 100644 --- a/drivers/staging/rtl8723bs/core/rtw_recv.c +++ b/drivers/staging/rtl8723bs/core/rtw_recv.c @@ -680,10 +680,10 @@ static void count_rx_stats(struct adapter *padapter, = union recv_frame *prframe, sz =3D get_recvframe_len(prframe); precvpriv->rx_bytes +=3D sz; =20 - padapter->mlmepriv.LinkDetectInfo.NumRxOkInPeriod++; + padapter->mlmepriv.link_detect_info.num_rx_ok_in_period++; =20 if ((!is_broadcast_ether_addr(pattrib->dst)) && (!is_multicast_ether_addr= (pattrib->dst))) - padapter->mlmepriv.LinkDetectInfo.NumRxUnicastOkInPeriod++; + padapter->mlmepriv.link_detect_info.num_rx_unicast_ok_in_period++; =20 if (sta) psta =3D sta; diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rt= l8723bs/core/rtw_xmit.c index 314027ea79a4..06537f21bbe6 100644 --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c @@ -1392,7 +1392,7 @@ void rtw_count_tx_stats(struct adapter *padapter, str= uct xmit_frame *pxmitframe, if ((pxmitframe->frame_tag & 0x0f) =3D=3D DATA_FRAMETAG) { pkt_num =3D pxmitframe->agg_num; =20 - pmlmepriv->LinkDetectInfo.NumTxOkInPeriod +=3D pkt_num; + pmlmepriv->link_detect_info.num_tx_ok_in_period +=3D pkt_num; =20 pxmitpriv->tx_pkts +=3D pkt_num; =20 diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/r= tl8723bs/hal/hal_btcoex.c index 9105594d2dde..9c84f4cf1dda 100644 --- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c +++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c @@ -167,7 +167,7 @@ static u8 halbtcoutsrc_IsWifiBusy(struct adapter *padap= ter) if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE) =3D=3D true) { if (check_fwstate(pmlmepriv, WIFI_AP_STATE) =3D=3D true) return true; - if (pmlmepriv->LinkDetectInfo.bBusyTraffic) + if (pmlmepriv->link_detect_info.busy_traffic) return true; } =20 @@ -364,9 +364,9 @@ static u8 halbtcoutsrc_Get(void *pBtcContext, u8 getTyp= e, void *pOutBuf) case BTC_GET_U4_WIFI_TRAFFIC_DIRECTION: { struct rt_link_detect_t *plinkinfo; - plinkinfo =3D &padapter->mlmepriv.LinkDetectInfo; + plinkinfo =3D &padapter->mlmepriv.link_detect_info; =20 - if (plinkinfo->NumTxOkInPeriod > plinkinfo->NumRxOkInPeriod) + if (plinkinfo->num_tx_ok_in_period > plinkinfo->num_rx_ok_in_period) *pU4Tmp =3D BTC_WIFI_TRAFFIC_TX; else *pU4Tmp =3D BTC_WIFI_TRAFFIC_RX; diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/stagi= ng/rtl8723bs/hal/rtl8723bs_xmit.c index 33c23b80e11b..32533a748f4d 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c @@ -202,7 +202,7 @@ static s32 xmit_xmitframes(struct adapter *padapter, st= ruct xmit_priv *pxmitpriv =20 if ( (check_pending_xmitbuf(pxmitpriv)) && - (padapter->mlmepriv.LinkDetectInfo.bHigherBusyTxTraffic) + (padapter->mlmepriv.link_detect_info.higher_busy_tx_traffic) ) { if ((phwxmit->accnt > 0) && (phwxmit->accnt < 5)) { err =3D -2; @@ -482,7 +482,7 @@ s32 rtl8723bs_hal_xmit( (pxmitframe->attrib.ether_type !=3D 0x888e) && (pxmitframe->attrib.dhcp_pkt !=3D 1) ) { - if (padapter->mlmepriv.LinkDetectInfo.bBusyTraffic) + if (padapter->mlmepriv.link_detect_info.busy_traffic) rtw_issue_addbareq_cmd(padapter, pxmitframe); } =20 diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme.h b/drivers/staging= /rtl8723bs/include/rtw_mlme.h index 2a128568c6df..3cec80135fcd 100644 --- a/drivers/staging/rtl8723bs/include/rtw_mlme.h +++ b/drivers/staging/rtl8723bs/include/rtw_mlme.h @@ -93,18 +93,25 @@ struct sitesurvey_ctrl { }; =20 struct rt_link_detect_t { - u32 NumTxOkInPeriod; - u32 NumRxOkInPeriod; - u32 NumRxUnicastOkInPeriod; - bool bBusyTraffic; - bool bTxBusyTraffic; - bool bRxBusyTraffic; - bool bHigherBusyTraffic; /* For interrupt migration purpose. */ - bool bHigherBusyRxTraffic; /* We may disable Tx interrupt according as= Rx traffic. */ - bool bHigherBusyTxTraffic; /* We may disable Tx interrupt according as= Tx traffic. */ + u32 num_tx_ok_in_period; + u32 num_rx_ok_in_period; + u32 num_rx_unicast_ok_in_period; + bool busy_traffic; + bool tx_busy_traffic; + bool rx_busy_traffic; + + /* For interrupt migration purpose. */ + bool higher_busy_traffic; + + /* We may disable Tx interrupt according as Rx traffic. */ + bool higher_busy_rx_traffic; + + /* We may disable Tx interrupt according as Tx traffic. */ + bool higher_busy_tx_traffic; + /* u8 TrafficBusyState; */ - u8 TrafficTransitionCount; - u32 LowPowerTransitionCount; + u8 traffic_transition_count; + u32 low_power_transition_count; }; =20 /* used for mlme_priv.roam_flags */ @@ -171,7 +178,7 @@ struct mlme_priv { =20 struct ht_priv htpriv; =20 - struct rt_link_detect_t LinkDetectInfo; + struct rt_link_detect_t link_detect_info; struct timer_list dynamic_chk_timer; /* dynamic/periodic check timer */ =20 u8 acm_mask; /* for wmm acm mask */ diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/st= aging/rtl8723bs/os_dep/ioctl_cfg80211.c index 476ab055e53e..5a82279fa681 100644 --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c @@ -1232,7 +1232,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy goto check_need_indicate_scan_done; } =20 - if (pmlmepriv->LinkDetectInfo.bBusyTraffic =3D=3D true) { + if (pmlmepriv->link_detect_info.busy_traffic) { static unsigned long lastscantime; unsigned long passtime; =20 diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/= rtl8723bs/os_dep/os_intfs.c index f7f23d1b1709..eb1186e69bdf 100644 --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c @@ -606,11 +606,11 @@ void rtw_reset_drv_sw(struct adapter *padapter) padapter->xmitpriv.tx_pkts =3D 0; padapter->recvpriv.rx_pkts =3D 0; =20 - pmlmepriv->LinkDetectInfo.bBusyTraffic =3D false; + pmlmepriv->link_detect_info.busy_traffic =3D false; =20 - /* pmlmepriv->LinkDetectInfo.TrafficBusyState =3D false; */ - pmlmepriv->LinkDetectInfo.TrafficTransitionCount =3D 0; - pmlmepriv->LinkDetectInfo.LowPowerTransitionCount =3D 0; + /* pmlmepriv->link_detect_info.TrafficBusyState =3D false; */ + pmlmepriv->link_detect_info.traffic_transition_count =3D 0; + pmlmepriv->link_detect_info.low_power_transition_count =3D 0; =20 _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING); =20 --=20 2.52.0 From nobody Sat Feb 7 15:40:10 2026 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3567C30FC39 for ; Tue, 27 Jan 2026 20:04:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769544297; cv=none; b=uExgYUTqH5O+EWFUQiLMcjXMzw/DM9Axp+O7Dk7U/HOB8ka/8kkN/Cki76kiG2MKF58e016aR1SeF0C5mxchlxd8jDMmsLhm+LsiZaB35a23AeNZikzs3H+Z5Va8fNSgHM4GvwK/TeCWrjrlBE/WVkev3+vIPzIji7Fpa0wxFto= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769544297; c=relaxed/simple; bh=sXOaB7NIuFwO+ola+5LAme68gR6H9DmALpktmQVfoTA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Flscq+WTKoNuO/F4yXkAVQTk4jNe0xcd41M6e/AlFJSeWrWzWRjHL+4NF9B/L9HtQvD86+P6iSr/hFXxN261JhmoZ2T4XDtC6Ov5jzL1zKfBtFCtNO6hM5bN4acRg/TRs0d8YCB0gEXvb+1VDRc9y5bbRK/MdlvfxNqdeqd1RCo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XSQeAskN; arc=none smtp.client-ip=209.85.210.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XSQeAskN" Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-82311f4070cso120162b3a.0 for ; Tue, 27 Jan 2026 12:04:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769544295; x=1770149095; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NxOSxJR3eoAri4XJO8nrv4h+7CQ4CfbcPtMU0dg9utM=; b=XSQeAskNaocabWxAsoPrRPPyTLJNWPcOdr96kI9+6/nRNzVqZ/7qRhXW8wFNCDXrmF eyjundVRudH+zvM4AgCuwNjCiz8hBIaO/M6B2ULLw9FpLWVGhiWEXBe3s9YJUapltGvU N2CXNnXdtrFRb3maAkzG0gdPgSMJmg/wA8iDHM57U0mEY/E3xQH1tsaH0s95aMWVkZoh cy9T+YSEphZls8i3ipG8yRLrelIPR1j9BMTLR/p06rfpLLyLyvbhD5fMUArX+dTWmKNx fnD2OGlhYhabUV6Nl57EYlCRZMVlFi7S/znNLld6mSTE5WA08IRx//cdUihFjWYMsnq8 Lk/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769544295; x=1770149095; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=NxOSxJR3eoAri4XJO8nrv4h+7CQ4CfbcPtMU0dg9utM=; b=RPEKshYyjYSHqxbUpxwVq92isk8RcACww3gr81gIwCQJTsNPMmigCE+rRqak5BatQd nUlHBlr9r/Qy+D6N9SmmH0J28MprMhGiF778ZNZBBmBxOajR1ITZUMsaUQGDumnHwHui QeD6U4Y3CvxJVVc3fj9lP8VkGYO0cjcEvlGyPpyNKh/OzDMQyMJWXh3J+mR5FResTeIf VMWVCdLNMQaYuLQ+t8V68RDhVpl0v+igMnLbEyVC/EGkXL6tycEtWCPxVm0HOv5CVKaE /KqMXiQUUu3JqBPPnNGpZhmqPzkSzvoxsfOKjHYp3ZHULgXJZ2rr1JggHCJyjuBs6ZgV pYQw== X-Forwarded-Encrypted: i=1; AJvYcCU+KOLxrNQGK2cbEgfcJpcNThWkFfIYGfC5KT6lupfVhQXREDeWtx+y1Cge7X3IuqcTMy3hv/4HByASL6I=@vger.kernel.org X-Gm-Message-State: AOJu0YwCeRyfmmBBFnPZJfWDDFnhvi8Ph6mGgaymlBlTc5jGSzkWhn8W 7rN7zeWwyVbWhKwkEiqXV+YRsHOyof1+EPtms/1G0ryLEMhQ3M1/CI+UzPpy7Q== X-Gm-Gg: AZuq6aIVxkDNK6gnD01chPZo+1sL85JLnRePT+dySplAfaPQnmMORjG1nbGSQ9KUDx/ 00q6+A+WV1Uuu2Pw66xHjZLrM9o+uW8plZ0pRgYVgEUb6sulMsHsBalMJQETLE/qrDDSitVg7SU RfGtG5Ute13s3bQIGJTpS4LmdTtye3dponx2DG1s+D9yKVRoL7/J5hhcE8eblTnmDzpxOlZVVV9 weUElN7GR0OCBAPtTc0TC+WIV2RGDGYQZUmwA++Hblc0YZNkgySgJoADnF5jymX0UbNc/68b7ov QVyZEohppLVrWSke8UNm4OX8XrRbxBl0juWw5mnBiZMnkFu68T44SpFJ6SZtPRdxiCWU6meX6ME GsLKn5JatVzPHhWEMcSJ2T1+XF2/c8h5cOVudqTCUPlb8s3+MRRzfZekFXCGBVpWwCRA/MTrZ6b iXq9rkS5AeIIHd2B2y X-Received: by 2002:a05:6a00:1a0b:b0:81f:c6d1:5608 with SMTP id d2e1a72fcca58-8236a14bd51mr2568262b3a.1.1769544295423; Tue, 27 Jan 2026 12:04:55 -0800 (PST) Received: from snowman ([2401:4900:646d:9a6e:84d0:c92:d353:cd21]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82379b59e10sm377771b3a.25.2026.01.27.12.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 12:04:55 -0800 (PST) From: Khushal Chitturi To: gregkh@linuxfoundation.org Cc: dan.carpenter@linaro.org, straube.linux@gmail.com, hansg@kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Khushal Chitturi Subject: [PATCH v5 3/3] staging: rtl8723bs: fix line length and alignment issues Date: Wed, 28 Jan 2026 01:34:27 +0530 Message-ID: <20260127200427.3669-4-khushalchitturi@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260127200427.3669-1-khushalchitturi@gmail.com> References: <20260127200427.3669-1-khushalchitturi@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Fix multiple coding style issues in rtw_xmit.c to comply with the kernel coding style by splitting expressions and adjusting alignment. This patch resolves checkpatch.pl warnings caused by line length exceeding 100 columns and alignment matching the open parenthesis. Signed-off-by: Khushal Chitturi --- Changelog: v4 -> v5: Rebased onto current staging-testing. v3 -> v4: Adjusted comment formatting. v2 -> v3: Resubmitted as a versioned series to resolve threading confusion. v1 -> v2: No changes. drivers/staging/rtl8723bs/core/rtw_xmit.c | 107 +++++++++++++--------- 1 file changed, 66 insertions(+), 41 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rt= l8723bs/core/rtw_xmit.c index 06537f21bbe6..be1054234bb2 100644 --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c @@ -126,10 +126,14 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, = struct adapter *padapter) pxmitbuf->buf_tag =3D XMITBUF_DATA; =20 /* Tx buf allocation may fail sometimes, so sleep and retry. */ - res =3D rtw_os_xmit_resource_alloc(padapter, pxmitbuf, (MAX_XMITBUF_SZ += XMITBUF_ALIGN_SZ), true); + res =3D rtw_os_xmit_resource_alloc(padapter, pxmitbuf, + (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), + true); if (res =3D=3D _FAIL) { msleep(10); - res =3D rtw_os_xmit_resource_alloc(padapter, pxmitbuf, (MAX_XMITBUF_SZ = + XMITBUF_ALIGN_SZ), true); + res =3D rtw_os_xmit_resource_alloc(padapter, pxmitbuf, + (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), + true); if (res =3D=3D _FAIL) goto exit; } @@ -208,7 +212,9 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, st= ruct adapter *padapter) pxmitbuf->padapter =3D padapter; pxmitbuf->buf_tag =3D XMITBUF_MGNT; =20 - res =3D rtw_os_xmit_resource_alloc(padapter, pxmitbuf, MAX_XMIT_EXTBUF_S= Z + XMITBUF_ALIGN_SZ, true); + res =3D rtw_os_xmit_resource_alloc(padapter, pxmitbuf, + MAX_XMIT_EXTBUF_SZ + XMITBUF_ALIGN_SZ, + true); if (res =3D=3D _FAIL) { res =3D _FAIL; goto exit; @@ -291,7 +297,9 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv) } =20 for (i =3D 0; i < NR_XMITBUFF; i++) { - rtw_os_xmit_resource_free(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_= ALIGN_SZ), true); + rtw_os_xmit_resource_free(padapter, pxmitbuf, + (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), + true); =20 pxmitbuf++; } @@ -313,7 +321,9 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv) /* free xmit extension buff */ pxmitbuf =3D (struct xmit_buf *)pxmitpriv->pxmit_extbuf; for (i =3D 0; i < NR_XMIT_EXTBUFF; i++) { - rtw_os_xmit_resource_free(padapter, pxmitbuf, (MAX_XMIT_EXTBUF_SZ + XMIT= BUF_ALIGN_SZ), true); + rtw_os_xmit_resource_free(padapter, pxmitbuf, + (MAX_XMIT_EXTBUF_SZ + XMITBUF_ALIGN_SZ), + true); =20 pxmitbuf++; } @@ -366,10 +376,12 @@ static void update_attrib_vcs_info(struct adapter *pa= dapter, struct xmit_frame * else /* no frag */ sz =3D pattrib->last_txcmdsz; =20 - /* (1) RTS_Threshold is compared to the MPDU, not MSDU. */ - /* (2) If there are more than one frag in this MSDU, only the first fra= g uses protection frame. */ - /* Other fragments are protected by previous fragment. */ - /* So we only need to check the length of first fragment. */ + /* (1) RTS_Threshold is compared to the MPDU, not MSDU. + * (2) If there are more than one frag in this MSDU, only the + * first frag uses protection frame. Other fragments are + * protected by the previous fragment, so we only need to + * check the length of first fragment. + */ if (pmlmeext->cur_wireless_mode < WIRELESS_11_24N || padapter->registryp= riv.wifi_spec) { if (sz > padapter->registrypriv.rts_thresh) { pattrib->vcs_mode =3D RTS_CTS; @@ -436,7 +448,8 @@ static void update_attrib_vcs_info(struct adapter *pada= pter, struct xmit_frame * pattrib->vcs_mode =3D padapter->driver_vcs_type; } =20 -static void update_attrib_phy_info(struct adapter *padapter, struct pkt_at= trib *pattrib, struct sta_info *psta) +static void update_attrib_phy_info(struct adapter *padapter, struct pkt_at= trib *pattrib, + struct sta_info *psta) { struct mlme_ext_priv *mlmeext =3D &padapter->mlmeextpriv; =20 @@ -464,7 +477,8 @@ static void update_attrib_phy_info(struct adapter *pada= pter, struct pkt_attrib * pattrib->ch_offset =3D psta->htpriv.ch_offset; pattrib->ampdu_en =3D false; =20 - if (padapter->driver_ampdu_spacing !=3D 0xFF) /* driver control AMPDU Den= sity for peer sta's rx */ + /* driver control AMPDU Density for peer sta's rx */ + if (padapter->driver_ampdu_spacing !=3D 0xFF) pattrib->ampdu_spacing =3D padapter->driver_ampdu_spacing; else pattrib->ampdu_spacing =3D psta->htpriv.rx_ampdu_min_spacing; @@ -472,7 +486,8 @@ static void update_attrib_phy_info(struct adapter *pada= pter, struct pkt_attrib * pattrib->retry_ctrl =3D false; } =20 -static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_att= rib *pattrib, struct sta_info *psta) +static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_att= rib *pattrib, + struct sta_info *psta) { signed int res =3D _SUCCESS; struct mlme_priv *pmlmepriv =3D &padapter->mlmepriv; @@ -511,7 +526,8 @@ static s32 update_attrib_sec_info(struct adapter *padap= ter, struct pkt_attrib *p } =20 /* For WPS 1.0 WEP, driver should not encrypt EAPOL Packet for WPS hands= hake. */ - if (((pattrib->encrypt =3D=3D _WEP40_) || (pattrib->encrypt =3D=3D _WEP1= 04_)) && (pattrib->ether_type =3D=3D 0x888e)) + if ((pattrib->encrypt =3D=3D _WEP40_ || pattrib->encrypt =3D=3D _WEP104_= ) && + pattrib->ether_type =3D=3D 0x888e) pattrib->encrypt =3D _NO_PRIVACY_; } =20 @@ -563,7 +579,7 @@ static s32 update_attrib_sec_info(struct adapter *padap= ter, struct pkt_attrib *p memcpy(pattrib->dot118021x_UncstKey.skey, psta->dot118021x_UncstKey.skey= , 16); =20 if (pattrib->encrypt && - ((padapter->securitypriv.sw_encrypt) || (!psecuritypriv->hw_decrypted))) + (padapter->securitypriv.sw_encrypt || !psecuritypriv->hw_decrypted)) pattrib->bswenc =3D true; else pattrib->bswenc =3D false; @@ -655,8 +671,9 @@ static s32 update_attrib(struct adapter *padapter, stru= ct sk_buff *pkt, struct p pattrib->pktlen =3D pktfile.pkt_len; =20 if (pattrib->ether_type =3D=3D ETH_P_IP) { - /* The following is for DHCP and ARP packet, we use cck1M to tx these p= ackets and let LPS awake some time */ - /* to prevent DHCP protocol fail */ + /* The following is for DHCP and ARP packets, we use cck1M to tx these + * packets and let LPS awake some time to prevent DHCP protocol fail + */ =20 u8 tmp[24]; =20 @@ -665,8 +682,8 @@ static s32 update_attrib(struct adapter *padapter, stru= ct sk_buff *pkt, struct p pattrib->dhcp_pkt =3D 0; if (pktfile.pkt_len > 282) {/* MINIMUM_DHCP_PACKET_SIZE) { */ if (pattrib->ether_type =3D=3D ETH_P_IP) {/* IP header */ - if (((tmp[21] =3D=3D 68) && (tmp[23] =3D=3D 67)) || - ((tmp[21] =3D=3D 67) && (tmp[23] =3D=3D 68))) { + if ((tmp[21] =3D=3D 68 && tmp[23] =3D=3D 67) || + (tmp[21] =3D=3D 67 && tmp[23] =3D=3D 68)) { /* 68 : UDP BOOTP client */ /* 67 : UDP BOOTP server */ pattrib->dhcp_pkt =3D 1; @@ -778,7 +795,8 @@ static s32 xmitframe_addmic(struct adapter *padapter, s= truct xmit_frame *pxmitfr if (pattrib->encrypt =3D=3D _TKIP_) { /* encode mic code */ { - u8 null_key[16] =3D {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, = 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; + u8 null_key[16] =3D {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; =20 pframe =3D pxmitframe->buf_addr + hw_hdr_offset; =20 @@ -998,10 +1016,10 @@ s32 rtw_txframes_pending(struct adapter *padapter) { struct xmit_priv *pxmitpriv =3D &padapter->xmitpriv; =20 - return ((!list_empty(&pxmitpriv->be_pending.queue)) || - (!list_empty(&pxmitpriv->bk_pending.queue)) || - (!list_empty(&pxmitpriv->vi_pending.queue)) || - (!list_empty(&pxmitpriv->vo_pending.queue))); + return !list_empty(&pxmitpriv->be_pending.queue) || + !list_empty(&pxmitpriv->bk_pending.queue) || + !list_empty(&pxmitpriv->vi_pending.queue) || + !list_empty(&pxmitpriv->vo_pending.queue); } =20 /* @@ -1031,7 +1049,8 @@ u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pk= t_attrib *pattrib) * 5. move frag chunk from pframe to pxmitframe->mem * 6. apply sw-encrypt, if necessary. */ -s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, = struct xmit_frame *pxmitframe) +s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, + struct xmit_frame *pxmitframe) { struct pkt_file pktfile; =20 @@ -1152,7 +1171,8 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, = struct sk_buff *pkt, struct } =20 /* broadcast or multicast management pkt use BIP, unicast management pkt u= se CCMP encryption */ -s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *= pkt, struct xmit_frame *pxmitframe) +s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *= pkt, + struct xmit_frame *pxmitframe) { u8 *pframe, *mem_start =3D NULL, *tmp_buf =3D NULL; u8 subtype; @@ -1235,7 +1255,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padap= ter, struct sk_buff *pkt, s } else { /* unicast mgmt frame TX */ /* start to encrypt mgmt frame */ if (subtype =3D=3D WIFI_DEAUTH || subtype =3D=3D WIFI_DISASSOC || - subtype =3D=3D WIFI_REASSOCREQ || subtype =3D=3D WIFI_ACTION) { + subtype =3D=3D WIFI_REASSOCREQ || subtype =3D=3D WIFI_ACTION) { if (pattrib->psta) psta =3D pattrib->psta; else @@ -1249,11 +1269,11 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *pad= apter, struct sk_buff *pkt, s =20 /* according 802.11-2012 standard, these five types are not robust type= s */ if (subtype =3D=3D WIFI_ACTION && - (pframe[WLAN_HDR_A3_LEN] =3D=3D RTW_WLAN_CATEGORY_PUBLIC || - pframe[WLAN_HDR_A3_LEN] =3D=3D RTW_WLAN_CATEGORY_HT || - pframe[WLAN_HDR_A3_LEN] =3D=3D RTW_WLAN_CATEGORY_UNPROTECTED_WNM || - pframe[WLAN_HDR_A3_LEN] =3D=3D RTW_WLAN_CATEGORY_SELF_PROTECTED || - pframe[WLAN_HDR_A3_LEN] =3D=3D RTW_WLAN_CATEGORY_P2P)) + (pframe[WLAN_HDR_A3_LEN] =3D=3D RTW_WLAN_CATEGORY_PUBLIC || + pframe[WLAN_HDR_A3_LEN] =3D=3D RTW_WLAN_CATEGORY_HT || + pframe[WLAN_HDR_A3_LEN] =3D=3D RTW_WLAN_CATEGORY_UNPROTECTED_WNM || + pframe[WLAN_HDR_A3_LEN] =3D=3D RTW_WLAN_CATEGORY_SELF_PROTECTED || + pframe[WLAN_HDR_A3_LEN] =3D=3D RTW_WLAN_CATEGORY_P2P)) goto xmitframe_coalesce_fail; /* before encrypt dump the management packet content */ if (pattrib->encrypt > 0) @@ -1410,7 +1430,7 @@ void rtw_count_tx_stats(struct adapter *padapter, str= uct xmit_frame *pxmitframe, } =20 static struct xmit_buf *__rtw_alloc_cmd_xmitbuf(struct xmit_priv *pxmitpri= v, - enum cmdbuf_type buf_type) + enum cmdbuf_type buf_type) { struct xmit_buf *pxmitbuf =3D NULL; =20 @@ -1431,7 +1451,7 @@ static struct xmit_buf *__rtw_alloc_cmd_xmitbuf(struc= t xmit_priv *pxmitpriv, } =20 struct xmit_frame *__rtw_alloc_cmdxmitframe(struct xmit_priv *pxmitpriv, - enum cmdbuf_type buf_type) + enum cmdbuf_type buf_type) { struct xmit_frame *pcmdframe; struct xmit_buf *pxmitbuf; @@ -1766,7 +1786,8 @@ s32 rtw_xmitframe_enqueue(struct adapter *padapter, s= truct xmit_frame *pxmitfram return _SUCCESS; } =20 -struct tx_servq *rtw_get_sta_pending(struct adapter *padapter, struct sta_= info *psta, signed int up, u8 *ac) +struct tx_servq *rtw_get_sta_pending(struct adapter *padapter, struct sta_= info *psta, + signed int up, u8 *ac) { struct tx_servq *ptxservq =3D NULL; =20 @@ -2020,7 +2041,8 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *x= mitframe) return allow; } =20 -signed int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, st= ruct xmit_frame *pxmitframe) +signed int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, + struct xmit_frame *pxmitframe) { signed int ret =3D false; struct sta_info *psta =3D NULL; @@ -2115,7 +2137,8 @@ signed int xmitframe_enqueue_for_sleeping_sta(struct = adapter *padapter, struct x if (wmmps_ac) psta->sleepq_ac_len++; =20 - if (((psta->has_legacy_ac) && (!wmmps_ac)) || ((!psta->has_legacy_ac) &= & (wmmps_ac))) { + if ((psta->has_legacy_ac && !wmmps_ac) || + (!psta->has_legacy_ac && wmmps_ac)) { if (!(pstapriv->tim_bitmap & BIT(psta->aid))) update_tim =3D true; =20 @@ -2135,7 +2158,8 @@ signed int xmitframe_enqueue_for_sleeping_sta(struct = adapter *padapter, struct x return ret; } =20 -static void dequeue_xmitframes_to_sleeping_queue(struct adapter *padapter,= struct sta_info *psta, struct __queue *pframequeue) +static void dequeue_xmitframes_to_sleeping_queue(struct adapter *padapter,= struct sta_info *psta, + struct __queue *pframequeue) { signed int ret; struct list_head *plist, *phead, *tmp; @@ -2156,7 +2180,8 @@ static void dequeue_xmitframes_to_sleeping_queue(stru= ct adapter *padapter, struc ret =3D xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe); =20 if (ret) { - ptxservq =3D rtw_get_sta_pending(padapter, psta, pattrib->priority, (u8= *)(&ac_index)); + ptxservq =3D rtw_get_sta_pending(padapter, psta, pattrib->priority, + (u8 *)(&ac_index)); =20 ptxservq->qcnt--; phwxmits[ac_index].accnt--; @@ -2461,9 +2486,9 @@ struct xmit_buf *dequeue_pending_xmitbuf_under_survey= (struct xmit_priv *pxmitpri =20 type =3D GetFrameSubType(pxmitbuf->pbuf + TXDESC_OFFSET); =20 - if ((type =3D=3D WIFI_PROBEREQ) || - (type =3D=3D WIFI_DATA_NULL) || - (type =3D=3D WIFI_QOS_DATA_NULL)) { + if (type =3D=3D WIFI_PROBEREQ || + type =3D=3D WIFI_DATA_NULL || + type =3D=3D WIFI_QOS_DATA_NULL) { list_del_init(&pxmitbuf->list); break; } --=20 2.52.0