From nobody Sat Apr 11 21:29:15 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00C5AC19F2D for ; Sat, 6 Aug 2022 11:14:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241797AbiHFLOa (ORCPT ); Sat, 6 Aug 2022 07:14:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232296AbiHFLOP (ORCPT ); Sat, 6 Aug 2022 07:14:15 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AE9711810 for ; Sat, 6 Aug 2022 04:14:14 -0700 (PDT) Received: from dslb-188-097-043-167.188.097.pools.vodafone-ip.de ([188.97.43.167] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1oKHkv-0001FX-1w; Sat, 06 Aug 2022 13:14:09 +0200 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH v2 3/5] staging: r8188eu: read capability info from struct ieee80211_mgmt Date: Sat, 6 Aug 2022 13:13:50 +0200 Message-Id: <20220806111352.690650-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220806111352.690650-1-martin@kaiser.cx> References: <20220724153917.138848-1-martin@kaiser.cx> <20220806111352.690650-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Read the capability info of the association response message from struct ieee80211_mgmt. This should be easier to understand and to review than calculating the offset manually. Signed-off-by: Martin Kaiser --- v2: - rewrite the commit message drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/= r8188eu/core/rtw_mlme_ext.c index 53444cb1dba9..0a78b8bbb66a 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -1348,8 +1348,7 @@ unsigned int OnAssocRsp(struct adapter *padapter, str= uct recv_frame *precv_frame goto report_assoc_result; } =20 - /* get capabilities */ - pmlmeinfo->capability =3D le16_to_cpu(*(__le16 *)(pframe + WLAN_HDR_A3_LE= N)); + pmlmeinfo->capability =3D le16_to_cpu(mgmt->u.assoc_resp.capab_info); =20 /* set slot time */ pmlmeinfo->slotTime =3D (pmlmeinfo->capability & BIT(10)) ? 9 : 20; --=20 2.30.2