Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3765676rwb; Mon, 16 Jan 2023 12:38:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXsf1ysR1f6wPwgWjJyzLywjD7iyVQ6vYt+sGyMYgIyr/4ki8lZgdDgviEsWzgNo50DFsN/U X-Received: by 2002:a05:6a20:a690:b0:af:758e:5923 with SMTP id ba16-20020a056a20a69000b000af758e5923mr261295pzb.21.1673901503840; Mon, 16 Jan 2023 12:38:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673901503; cv=none; d=google.com; s=arc-20160816; b=AW9OL91u7lQEgC1keJ6d45z1W6uUWN1G5D/pfPy/CVEJgiJv0iP+5+R+blAUGu+Gor a5l3Z+CNhoot2Va/CQmX0epShO40sNlAOTDvhdfXLOkWxBSuLjp//4o42kjm1kdlm1py virNykw/heIryiNuAOinm/4pT7ecLJvdRfIxSloL/scQ60xpkLrWxjaqnYjDL0eqDc0N uHO2HX00M8sh1LWtAi3Hug8FcICYg5snsUUWLYmPJf9JrsYvkWQk6k/RHUqyEyYvWIOv HCV0CRToM5j2tiwj6mLtS2lWM+4NUGRSiiap2iedPfXNFmyupI4BZhBbI5HXFDnRQ2CE w0kg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=3ekO/5E+sI7rrywBLWFcPeU6/uU3IUJDtpodEXrmlTs=; b=WxB6ohuFLsUVDBhA97K97kbmqGZP8CU6fq9QickQkZ0/V36TFdam7ajPcf3rdD8WCb ZH5ce1dVPzju/JefvidnJH3PfBbbkRVZghFts6m9gcccroBJvjA3atx8J1G5Z46AJ4lN MyjQaTv3zrX8JNRyDYjzoVWssyph6NRgnCMyWOSnZKYax8yFVb53aX2ldabCqcw2JW0w 22yz0xMg8KtT2mCEfYA5Ni2zBqfkc7mAA+fzvzLxbUUj6n5FZ1oy1GgKlvT2K59K82HS A/Tp7qIdkKLR4iRKs09bWsVbPW25aOUACn5xZip8gRjlo58pCzQv86uyCb2KPzF8xx3N LCLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@schmorgal.com header.s=google header.b=XJvUdQ4d; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=schmorgal.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nk1-20020a17090b194100b002263b1df9f7si12706538pjb.0.2023.01.16.12.38.16; Mon, 16 Jan 2023 12:38:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@schmorgal.com header.s=google header.b=XJvUdQ4d; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=schmorgal.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231308AbjAPUYp (ORCPT + 63 others); Mon, 16 Jan 2023 15:24:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232295AbjAPUYn (ORCPT ); Mon, 16 Jan 2023 15:24:43 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AC6C241D4 for ; Mon, 16 Jan 2023 12:24:42 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id m7-20020a17090a730700b00225ebb9cd01so34931907pjk.3 for ; Mon, 16 Jan 2023 12:24:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schmorgal.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3ekO/5E+sI7rrywBLWFcPeU6/uU3IUJDtpodEXrmlTs=; b=XJvUdQ4df94kt0lk8nbK57bGB+0tB8SnwaWc6FArsECYtbTqqJNsCmsBBFvvfGM82a JGmLMeszA68jBpeSH6Tnm3gCBTL5RZNCtPB6groKKD7ScnUkIc/zd9MKjEAjtVBESAp4 LUGpZCIxLWaxVEzkhtAfgag/GVeF83LWbf1Dk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3ekO/5E+sI7rrywBLWFcPeU6/uU3IUJDtpodEXrmlTs=; b=VBarlinb+3vPmxZ8B9xy3fTM2fHrMQxMzP4uI9LsRHbAEQnp9LAQ2owxfCAdAAb3Ft Bu2Un7MtUCMktHT+0shMBNA68WmU0WXlJUpf8tNU5942I2gzv4SqK0WBlIdJL23ZBzFU i41K9HmoPilFAiaJVpn350v6LYyLQv7ZJWAvqvOQChQGioz+Wk+eQWyzrUNG+MmB8+bV 2Aews13rC9rxrm+WzGYaGfMeQjFSgjBgQ95d/0qvMRCvaTP2Ed6AHGLuajXcE3NQwiBX 6OfS9muK+RLWIePxdFCxXwhlieIJs/vXjZ/CbWLLL8nQwRLzjUjbGB6tE68I/skYjYHI PC3Q== X-Gm-Message-State: AFqh2kpKldJPxYzOK/VJT4QMRANN69PdIIxGFEGlbUDLqS3nEsK/Ej4u klPLnn84y7qh2hvo4l4dz3738Q== X-Received: by 2002:a17:902:b58a:b0:193:2b86:bdc7 with SMTP id a10-20020a170902b58a00b001932b86bdc7mr964607pls.42.1673900681513; Mon, 16 Jan 2023 12:24:41 -0800 (PST) Received: from doug-ryzen-5700G.. ([192.183.212.197]) by smtp.gmail.com with ESMTPSA id v11-20020a170902f0cb00b00180033438a0sm19782636pla.106.2023.01.16.12.24.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 12:24:40 -0800 (PST) From: Doug Brown To: Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Dan Williams , Simon Horman , libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Doug Brown Subject: [PATCH v3 0/4] wifi: libertas: IE handling fixes Date: Mon, 16 Jan 2023 12:21:22 -0800 Message-Id: <20230116202126.50400-1-doug@schmorgal.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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-wireless@vger.kernel.org This series implements two fixes for the libertas driver that restore compatibility with modern wpa_supplicant versions, and adds (or at least improves) support for WPS in the process. 1) Better handling of the RSN/WPA IE in association requests: The previous logic was always just grabbing the first one, and didn't handle multiple IEs properly, which wpa_supplicant adds nowadays. 2) Support for IEs in scan requests: Modern wpa_supplicant always adds an "extended capabilities" IE, which violates max_scan_ie_len in this driver. Go ahead and allow scan IEs, and handle WPS based on the info that Dan provided. These changes have been tested on a Marvell PXA168-based device with a Marvell 88W8686 Wi-Fi chipset. I've confirmed that with these changes applied, modern wpa_supplicant versions connect properly and WPS also works correctly (tested with "wpa_cli -i wlan0 wps_pbc any"). Changes since V2: - Add missing cpu_to_le16 as suggested by Simon Horman Changes since V1 (which was a single patch linked here [1]): - Switch to cfg80211_find_*_elem when looking for specific IEs, resulting in cleaner/safer code. - Use mrvl_ie_data struct for cleaner manipulation of TLV buffer, and fix capitalization of the "data" member to avoid checkpatch warnings. - Implement idea suggested by Dan to change max_scan_ie_len to be nonzero and enable WPS support in probe requests while we're at it. - Remove "Fixes:" tag; I'm not sure if it's still appropriate or not with it depending on the capitalization fix. - Clarify comments. [1] https://lore.kernel.org/all/20230102234714.169831-1-doug@schmorgal.com/ Doug Brown (4): wifi: libertas: fix capitalization in mrvl_ie_data struct wifi: libertas: only add RSN/WPA IE in lbs_add_wpa_tlv wifi: libertas: add new TLV type for WPS enrollee IE wifi: libertas: add support for WPS enrollee IE in probe requests drivers/net/wireless/marvell/libertas/cfg.c | 76 +++++++++++++++---- drivers/net/wireless/marvell/libertas/types.h | 3 +- 2 files changed, 65 insertions(+), 14 deletions(-) -- 2.34.1