Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp109963iof; Sun, 5 Jun 2022 22:41:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIphH4UMhP6x+8i5hppNznPy0mHHIXxp2SJZPGuI21LPJrZ31CjOTqLBj3k5pZm6TQRp2f X-Received: by 2002:a65:6b8a:0:b0:3db:7dc5:fec2 with SMTP id d10-20020a656b8a000000b003db7dc5fec2mr18937795pgw.223.1654494062076; Sun, 05 Jun 2022 22:41:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654494062; cv=none; d=google.com; s=arc-20160816; b=GKIeqSeAufYzB3ssPeut8st+wBhgcPjUXDV9IjIgCyO3vzBxrqrKXWrsQZyDNg0P8U im5RBYBU7kvJa0gDv81VGDXspTTijHAkqoPuQy3zLlT04KQFP8yloKrYl3V/3I/IVuna P01abzQkCcM4HPIbVFB+oDQObHpkMWBfvTEKyD+xtGKz8kdtDBfzY4FQBhNyXGqEWwS+ jHJ3ZCjv8LDzlwgnVECO1Q0C0lqaxET+w2wj8hygxgIzc6VBADTc1p1GeBrdVcLth9XW 3UWzaxYPjNGmkYYeqNhnn6Ms68IhUipAq3Ucx+xFXeo+Hcj+wDFJrKjwKDiIRb0XIF4C Q1gQ== 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; bh=+iccu3n9+dQZdpOY/4sWWyR90AwiSC08HD08JGyTUc4=; b=mOLq3D8ZqoSen0uZ6VRDmoWuAJX0XcOpSetLSxITuD5Z2gntpM5edgIDBkxVe34mbJ 3plmyfFqX+iC8swZ0jviF9kxprpam6FYN8vKvo78VwuiSVd4AMT7iRrZ/LHvVIDjwRMs PvXoLD88BhG+xJmPhiGjJsJhIVwixVnJLT+3Z7vC56yU9FpFUIa7Asxoaf/oyuV5V87Q y4k9UjezsyKdNgX318qL/Jz5E1RgSv13v8VdP6qz0mFkturmRMNND6aXeDk39+im21yM Rqo+VU5HEuL4MQ81XevYCTFQ24N54yxu7bA9bDHQAVxa4YA+F3TRtkGjtDoOgIU2yTMk 3gsw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i2-20020a17090aee8200b001df4ea7a026si22242021pjz.34.2022.06.05.22.41.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:41:02 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 60BFE2F1F3C; Sun, 5 Jun 2022 21:47:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238790AbiFBTiQ (ORCPT + 99 others); Thu, 2 Jun 2022 15:38:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238712AbiFBThz (ORCPT ); Thu, 2 Jun 2022 15:37:55 -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 E4E102EA36 for ; Thu, 2 Jun 2022 12:37:53 -0700 (PDT) Received: from ipservice-092-217-081-045.092.217.pools.vodafone-ip.de ([92.217.81.45] 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 1nwqda-0003py-Pq; Thu, 02 Jun 2022 21:37:42 +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 04/11] staging: r8188eu: use ieee80211 to set addba resp capabilities Date: Thu, 2 Jun 2022 21:37:19 +0200 Message-Id: <20220602193726.280922-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220602193726.280922-1-martin@kaiser.cx> References: <20220602193726.280922-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the mgmt structure and defines from ieee80211.h to set the capabilities field of an addba response. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index de2a1e8b1a65..b391273969af 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -5446,16 +5446,11 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch pattrib->pktlen++; mgmt->u.action.u.addba_resp.status = cpu_to_le16(status); pattrib->pktlen += 2; - BA_para_set = le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f; - BA_para_set |= 0x1000; /* 64 buffer size */ - - if (pregpriv->ampdu_amsdu == 0)/* disabled */ - BA_para_set = BA_para_set & ~BIT(0); - else if (pregpriv->ampdu_amsdu == 1)/* enabled */ - BA_para_set = BA_para_set | BIT(0); - le_tmp = cpu_to_le16(BA_para_set); - - pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)&le_tmp, &pattrib->pktlen); + capab = le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f; + capab |= u16_encode_bits(64, IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK); + capab |= u16_encode_bits(pregpriv->ampdu_amsdu, IEEE80211_ADDBA_PARAM_AMSDU_MASK); + mgmt->u.action.u.addba_req.capab = cpu_to_le16(capab); + pattrib->pktlen += 2; mgmt->u.action.u.addba_resp.timeout = pmlmeinfo->ADDBA_req.BA_timeout_value; pattrib->pktlen += 2; break; -- 2.30.2