From patchwork Fri May 10 14:06:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796482 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3937D136E0C for ; Fri, 10 May 2024 14:06:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350015; cv=none; b=u6mGNXKz+pL/yNX/gMKM676o7Mqjf+2eEPLjTUE33SO9VqsBNDQDywR59pttjVLNMBxiq/l3GmX7LgOjIxOSgTyoU1HZva7SLn2tv9oEq/WYFoY/a+QgO6Mmi4KY3JlCLZ1JI0X+qVl3dhqiTEtmrkT98L/ZKbGXXxbywjCbQPQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350015; c=relaxed/simple; bh=2eYnwjii5TY0WonVlBXB1ItTcIGPYGSOvIvYYeqnqZg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=F5A32IrdQmsIWiMyBGgtf36BNqAq6zUAMCFpDZ15xla4Xx1s2MxPUQkV91Vk9sJ3UmQ1v3nJbDKdX/hfpcgupIurwe7DVkiVqJ1klb6OYLdvlg36LQByFwT2SXizjLx+rhe8j8F/vN9klyWD/dxZeoZGa5QejPo6kVZlfGpRQVI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=k7SW7+oM; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="k7SW7+oM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715350014; x=1746886014; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2eYnwjii5TY0WonVlBXB1ItTcIGPYGSOvIvYYeqnqZg=; b=k7SW7+oM1d8S8hWzRsBWwtsftQyIJEQHu9YHINTBLcJ0EgCF1LWejXOP 1sTtvnpV7Jh3+ySkftzIUyJJBFSF1P0aP4SCzllsRX1xjLUdxL7wRcOGf +Y6MVXsAiwEqc8Q8JOwB+E+x+chxutZlMx+RVkQ/b7Vp4ozktochofd11 aA8QhoIY5mdw2uGI0HTzGmlG34Ibc9k01LITSb0LPvMCJ7r033gq1Utjx O39gZWpDdZXJLurMdeB94obIlsDQV48+kUznw1KQdLq4GAmhidH7jzuzq 0hkihsGr45QshCfOaD6omfsQlVex+XCya21g9oZQYr/yNx7+5tV0zPXV9 A==; X-CSE-ConnectionGUID: o6b8ELmRQrK4g8ZD+h+4Tg== X-CSE-MsgGUID: 5+M1rJiET424KG85xyH8Kg== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="15125518" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15125518" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:06:54 -0700 X-CSE-ConnectionGUID: T49YHlbxSGmG0sw/LvEHwQ== X-CSE-MsgGUID: ALSkBiQyREm3oUzZ9zOIlw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="67101808" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:06:53 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Luciano Coelho Subject: [PATCH 01/14] iwlwifi: dvm: clean up rs_get_rate() logic Date: Fri, 10 May 2024 17:06:28 +0300 Message-Id: <20240510170500.a4cdb41825eb.Id202bcc967c32829f70ab1412f8893b6eb7f78e2@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> References: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Johannes Berg The logic here is rather convoluted - we cannot get here with lq_sta being NULL as mac80211 will (no longer) call us like that, and since I removed the rate_control_send_low() call in this function there's no longer any point in setting priv_sta to NULL either. So the only thing that remains to check is if we have actually initialized our lq_sta->drv pointer, and exit if we didn't in which case we'll use the data mac80211 already set up for the low rate usage. Signed-off-by: Johannes Berg Reviewed-by: Luciano Coelho --- drivers/net/wireless/intel/iwlwifi/dvm/rs.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/rs.c b/drivers/net/wireless/intel/iwlwifi/dvm/rs.c index f4a6f76cf193..8879e668ef0d 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/rs.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/rs.c @@ -2673,20 +2673,16 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta, IWL_DEBUG_RATE_LIMIT(priv, "rate scale calculate new rate for skb\n"); /* Get max rate if user set max rate */ - if (lq_sta) { - lq_sta->max_rate_idx = fls(txrc->rate_idx_mask) - 1; - if ((sband->band == NL80211_BAND_5GHZ) && - (lq_sta->max_rate_idx != -1)) - lq_sta->max_rate_idx += IWL_FIRST_OFDM_RATE; - if ((lq_sta->max_rate_idx < 0) || - (lq_sta->max_rate_idx >= IWL_RATE_COUNT)) - lq_sta->max_rate_idx = -1; - } + lq_sta->max_rate_idx = fls(txrc->rate_idx_mask) - 1; + if (sband->band == NL80211_BAND_5GHZ && lq_sta->max_rate_idx != -1) + lq_sta->max_rate_idx += IWL_FIRST_OFDM_RATE; + if (lq_sta->max_rate_idx < 0 || lq_sta->max_rate_idx >= IWL_RATE_COUNT) + lq_sta->max_rate_idx = -1; - /* Treat uninitialized rate scaling data same as non-existing. */ - if (lq_sta && !lq_sta->drv) { + if (!lq_sta->drv) { IWL_DEBUG_RATE(priv, "Rate scaling not initialized yet.\n"); - priv_sta = NULL; + /* mac80211 already set up the data for using low rates */ + return; } rate_idx = lq_sta->last_txrate_idx; @@ -2756,7 +2752,6 @@ void iwl_rs_rate_init(struct iwl_priv *priv, struct ieee80211_sta *sta, u8 sta_i lq_sta = &sta_priv->lq_sta; sband = hw->wiphy->bands[conf->chandef.chan->band]; - lq_sta->lq.sta_id = sta_id; for (j = 0; j < LQ_SIZE; j++) From patchwork Fri May 10 14:06:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796210 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 038A21708BA for ; Fri, 10 May 2024 14:06:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350017; cv=none; b=LIxA4S4epeCXC764wCYxpbbsVimwL58DYAgqziGVX69O+O9mLUa2hBbmdu1hvmCixDc/yZpYJkoNPeKMiG+JLfzc2Pu+MUpKPxtFlPeFZTMsFkOeAQ91SeXW+s0wAMmCkUHU14vyTxbSdaZWYXARLHDCMxgqeuJ4Ikonk5mtQPA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350017; c=relaxed/simple; bh=AaiA1BIAfwmsBD3ptPBu0ojVSxZ4Sr2x13KkpnA/JnY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=U5gcBxWholzE093usEDzgj/5GgjOJqTVKI09roKCwVy7ZGbswS+wqFsVarOLFlDEFZCmWlHdzNRSGgQyZ4c16JCYFlRRR33W65wWfNurdA1c0EdWEnkp7SymPSWlJzMl0fuv5ZH5RVl1ZeZUQwuK8fuv0rdZTNIge+z4JoA9NIU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=edv/anMS; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="edv/anMS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715350016; x=1746886016; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AaiA1BIAfwmsBD3ptPBu0ojVSxZ4Sr2x13KkpnA/JnY=; b=edv/anMSadA0j7nqmqHANYyUOuuajkKK+flsBNXSfnR9+N9kCAkqGPXf BVAexF/4aDsHq3lSQQIx7UO2kXEki+qV1E1mo2lq/09Ww5St55lb03pUG +HmoShs/0X+wJKhquC19rkvMl6pjPIaoAI7Ek8YVM6XwjJFyLJvO6XXhY N6N6oBkfzS8vs/oiop7dgd2PfLdPMMlCZO5VytHoKwzeUqOFNxLOVIvvb oOMEUBp4z6BGQcxaLsllbotgmzI/z7NtaLcphktFMAgPW25oxoUJ/Pzx2 bRKApsMN1Gg9kByzWj7NgUW/EZkxbBdQjRIEyGt3d1kvcRWIuR32rKr1q w==; X-CSE-ConnectionGUID: u+MfZaf/SmiXEf7qY27w8A== X-CSE-MsgGUID: Y305SAgTSDiMIfJ2OYE9hA== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="15125524" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15125524" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:06:55 -0700 X-CSE-ConnectionGUID: iYcMw1AdSMGslZ+p16Gpjg== X-CSE-MsgGUID: 9szlc1qLRPyQ+ufJ2j0BgA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="67101817" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:06:55 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Yedidya Benshimol , Greenman, Gregory Subject: [PATCH 02/14] iwlwifi: mvm: Change default value of lookup_notif_ver Date: Fri, 10 May 2024 17:06:29 +0300 Message-Id: <20240510170500.8cabfd580614.If3a0db9851f56041f8f5360959354abd5379224a@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> References: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Yedidya Benshimol After moving from commands to notificaitons in the d3 resume flow, removing the WOWLAN_GET_STATUSES and REPLY_OFFLOADS_QUERY_CMD causes the return of the default value when looking up their version. Returning zero here results in the driver sending the not supported NON_QOS_TX_COUNTER_CMD. Signed-off-by: Yedidya Benshimol Reviewed-by: Greenman, Gregory Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index 71e6b06481a9..0f954e506d62 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -2341,7 +2341,7 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm, out: if (iwl_fw_lookup_notif_ver(mvm->fw, LONG_GROUP, - WOWLAN_GET_STATUSES, 0) < 10) { + WOWLAN_GET_STATUSES, IWL_FW_CMD_VER_UNKNOWN) < 10) { mvmvif->seqno_valid = true; /* +0x10 because the set API expects next-to-use, not last-used */ mvmvif->seqno = status->non_qos_seq_ctr + 0x10; From patchwork Fri May 10 14:06:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796481 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C118417107F for ; Fri, 10 May 2024 14:06:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350019; cv=none; b=N1YWUt3PkWb2RiLMRbLLEL7TqKCdoWQbECb7kyll/4fpeYg8kASBqamJ3mAJ9yQC8RfONlUkGwb3IXKc7YW/YmxgmPcBNj5SdMBZROHOQK+BMSEi36VcIjLqu5xgXcFLPLC1rx8buRc8YKTtUK4RRZZaTZi53dT/Jq86I2dO8Jk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350019; c=relaxed/simple; bh=c4+WFOZE1cD7Mv/9QTcqsDFjhgI3JHDzVEWTw2xvl3A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YCVqM8OsoHWDUHWq6A+DliL55q2xMW+/tTcCS9BE6MfR7esTNPxXM/dozpVSN0BFBU82klqn58vsXel0SU+C8jmk713nR1X/7niRau2wjYLGMxuLsoW574U4NYD67NPTJlswxa0g0pY0j8Vv95EmvOI3Z39hIqh9057iN1RtlKk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=BfJvg3Pw; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BfJvg3Pw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715350017; x=1746886017; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=c4+WFOZE1cD7Mv/9QTcqsDFjhgI3JHDzVEWTw2xvl3A=; b=BfJvg3Pwn0Jjcj+YePLV3gmBnLzxmp9C1Kuv/YOHh233P+nYIwDU8Q9l gTpUkUasI6wcXfCLLBwChGLnM1hw3XoZGVMey4vFMtVo8xKKXZNG7kGSo h8RTVedSSANZZuiLypIWEohHzPeFxqwU/+XO8QKmIKwZMeDDj1zKsgmxi IXjIP8RCLSzqkGyG6kiH8wVxAcP3Nfel566rRE6go9bVF1lkIRNqDMJxM 8Hw7CskiTcv5nwDGSXOpmBgruTwwC+x1I6AE8bn+60ocG11KwaTpy42q9 MkiaaCYo7msysjPVB6l2XimUpNuPNxh3A3iRNLuLX14VUeLqugMTzwsBW g==; X-CSE-ConnectionGUID: LVo2CcXASGuruAWJxZC5VA== X-CSE-MsgGUID: hB9GVWk0TomNUYzQpR0r8w== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="15125532" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15125532" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:06:57 -0700 X-CSE-ConnectionGUID: tM3515cjQrajX6oSyw2e+A== X-CSE-MsgGUID: 7Z7xV2EARjWrlsJF9xh68g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="67101835" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:06:56 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH 03/14] iwlwifi: mvm: simplify the uAPSD coexistence limitation code Date: Fri, 10 May 2024 17:06:30 +0300 Message-Id: <20240510170500.4ac26534adf7.Ib892020177e86603b2be3a105f8717b9a15951d3@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> References: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Emmanuel Grumbach uAPSD can't be enabled on BSS or P2P Client if there is another active interface (e.g. associated client). Allow the code that apply those limitations to run on BSS as well. Also forbid uAPSD if we have an IBSS or NAN interface in the system. Since we are now forbidding uAPSD in any concurrency scenario, we don't need to check the number of PHY contexts. Signed-off-by: Emmanuel Grumbach Reviewed-on: https://git-amr-3.devtools.intel.com/gerrit/23958 Signed-off-by: Miri Korenblit --- .../net/wireless/intel/iwlwifi/mvm/power.c | 55 +++++++++---------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/power.c b/drivers/net/wireless/intel/iwlwifi/mvm/power.c index 568f53c56199..72f4480ae7f5 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/power.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/power.c @@ -211,19 +211,29 @@ static void iwl_mvm_power_configure_uapsd(struct iwl_mvm *mvm, IWL_MVM_PS_HEAVY_RX_THLD_PERCENT; } -static void iwl_mvm_p2p_standalone_iterator(void *_data, u8 *mac, - struct ieee80211_vif *vif) +struct iwl_allow_uapsd_iface_iterator_data { + struct ieee80211_vif *exclude_vif; + bool allow_uapsd; +}; + +static void iwl_mvm_allow_uapsd_iterator(void *_data, u8 *mac, + struct ieee80211_vif *vif) { - bool *is_p2p_standalone = _data; + struct iwl_allow_uapsd_iface_iterator_data *data = _data; - switch (ieee80211_vif_type_p2p(vif)) { - case NL80211_IFTYPE_P2P_GO: + /* exclude the given vif */ + if (vif == data->exclude_vif) + return; + + switch (vif->type) { case NL80211_IFTYPE_AP: - *is_p2p_standalone = false; + case NL80211_IFTYPE_ADHOC: + case NL80211_IFTYPE_NAN: + data->allow_uapsd = false; break; case NL80211_IFTYPE_STATION: if (vif->cfg.assoc) - *is_p2p_standalone = false; + data->allow_uapsd = false; break; default: @@ -235,6 +245,10 @@ static bool iwl_mvm_power_allow_uapsd(struct iwl_mvm *mvm, struct ieee80211_vif *vif) { struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); + struct iwl_allow_uapsd_iface_iterator_data data = { + .exclude_vif = vif, + .allow_uapsd = true, + }; if (ether_addr_equal(mvmvif->uapsd_misbehaving_ap_addr, vif->cfg.ap_addr)) @@ -249,30 +263,15 @@ static bool iwl_mvm_power_allow_uapsd(struct iwl_mvm *mvm, IEEE80211_P2P_OPPPS_ENABLE_BIT)) return false; - /* - * Avoid using uAPSD if client is in DCM - - * low latency issue in Miracast - */ - if (iwl_mvm_phy_ctx_count(mvm) >= 2) + if (vif->p2p && !iwl_mvm_is_p2p_scm_uapsd_supported(mvm)) return false; - if (vif->p2p) { - /* Allow U-APSD only if p2p is stand alone */ - bool is_p2p_standalone = true; - - if (!iwl_mvm_is_p2p_scm_uapsd_supported(mvm)) - return false; - - ieee80211_iterate_active_interfaces_atomic(mvm->hw, - IEEE80211_IFACE_ITER_NORMAL, - iwl_mvm_p2p_standalone_iterator, - &is_p2p_standalone); - - if (!is_p2p_standalone) - return false; - } + ieee80211_iterate_active_interfaces_atomic(mvm->hw, + IEEE80211_IFACE_ITER_NORMAL, + iwl_mvm_allow_uapsd_iterator, + &data); - return true; + return data.allow_uapsd; } static bool iwl_mvm_power_is_radar(struct ieee80211_vif *vif) From patchwork Fri May 10 14:06:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796209 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B28A171085 for ; Fri, 10 May 2024 14:06:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350021; cv=none; b=hfB8bRUq0ntxkPzfFwcEPcPulM0K5RLqyL8aU24ZGFqrm2JKChawvHQwF7fx5/0XW9JmrNJ6pl4+w/5a9mxFfDaYXfJ22kUmdPKcgKb2xpMe5CpzcnA28j2/81RZGpHt8SwdabMTkeKuZmJasUYYGTBDVFo8HCy+fGZpgOIVV/w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350021; c=relaxed/simple; bh=RgzUeUVm7GFYm5Qv+GWEl+Q2yhofmahBPlktfDP+o70=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rkFx1ER1SlKaYOLTd84O08UbKTK+waydUgYZjwYaUgXJuG5HEy9L7cSOvdloENgfSMJe7vjbpxdTMZmjhtb/9tm/l2sOLtgdR9333SfxPl4us0L/1//tWkGoDRNlYpcmE8LmsJqPY1CPproqcc7WmlkZzC2eBc8eO2j/98aSwtY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=aTD/LEAu; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="aTD/LEAu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715350019; x=1746886019; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RgzUeUVm7GFYm5Qv+GWEl+Q2yhofmahBPlktfDP+o70=; b=aTD/LEAufLHJjHdntzBz09kRfPTDMBPExKswjClLB1ZWOPIRmfnHs2Sf oSFiGOqpUnBTzzojOrrRtF0hfir8XjFkdJ7HqirBK2eJ+ZXjY8GJ/0Oz8 vxkb6xG/wYSc0uUJbhj6q+9J7g2+3tao2XYh92Fuykulkvj1TcM5iOta9 feiyZN1ObdRlotlxrpXrlW2N9vfE+wl8+XM4mn8zTTFUcSRuu0FCT8tuS UUBYdRQFA2zKRh0TDSEcw+XpjZUpR330iPScpdxtv8Iur7D7YoUCrFSly PxDUTiktULkJNxUjwlOu/PmYITH5pOHZn77Npvc2lxii/SHxy1h432moQ Q==; X-CSE-ConnectionGUID: 6od6salaR8ijX2/rDu0PWA== X-CSE-MsgGUID: 2LQtZbMkSsy49T6BpERO3A== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="15125538" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15125538" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:06:59 -0700 X-CSE-ConnectionGUID: VyuMQ4scSZmCnYrKNmPOsg== X-CSE-MsgGUID: J/0SX0exQFy0e4Wt8zpHTg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="67101847" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:06:58 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Avraham Stern , Coelho, Luciano Subject: [PATCH 04/14] iwlwifi: mvm: allow UAPSD when in SCM Date: Fri, 10 May 2024 17:06:31 +0300 Message-Id: <20240510170500.1ec19d432497.Id6de5337c878fa70e85bfcf6f4e0e34ce60756fb@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> References: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Avraham Stern Allow UAPSD when P2P and BSS interfaces share the same channel. Signed-off-by: Avraham Stern Reviewed-by: Coelho, Luciano Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/power.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/power.c b/drivers/net/wireless/intel/iwlwifi/mvm/power.c index 72f4480ae7f5..cc7176b0be4f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/power.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/power.c @@ -212,7 +212,7 @@ static void iwl_mvm_power_configure_uapsd(struct iwl_mvm *mvm, } struct iwl_allow_uapsd_iface_iterator_data { - struct ieee80211_vif *exclude_vif; + struct ieee80211_vif *current_vif; bool allow_uapsd; }; @@ -220,9 +220,12 @@ static void iwl_mvm_allow_uapsd_iterator(void *_data, u8 *mac, struct ieee80211_vif *vif) { struct iwl_allow_uapsd_iface_iterator_data *data = _data; + struct iwl_mvm_vif *other_mvmvif = iwl_mvm_vif_from_mac80211(vif); + struct iwl_mvm_vif *curr_mvmvif = + iwl_mvm_vif_from_mac80211(data->current_vif); /* exclude the given vif */ - if (vif == data->exclude_vif) + if (vif == data->current_vif) return; switch (vif->type) { @@ -232,7 +235,12 @@ static void iwl_mvm_allow_uapsd_iterator(void *_data, u8 *mac, data->allow_uapsd = false; break; case NL80211_IFTYPE_STATION: - if (vif->cfg.assoc) + /* allow UAPSD if P2P interface and BSS station interface share + * the same channel. + */ + if (vif->cfg.assoc && other_mvmvif->deflink.phy_ctxt && + curr_mvmvif->deflink.phy_ctxt && + other_mvmvif->deflink.phy_ctxt->id != curr_mvmvif->deflink.phy_ctxt->id) data->allow_uapsd = false; break; @@ -246,7 +254,7 @@ static bool iwl_mvm_power_allow_uapsd(struct iwl_mvm *mvm, { struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); struct iwl_allow_uapsd_iface_iterator_data data = { - .exclude_vif = vif, + .current_vif = vif, .allow_uapsd = true, }; From patchwork Fri May 10 14:06:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796480 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99725171647 for ; Fri, 10 May 2024 14:07:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350023; cv=none; b=YPFbBHmwoqMVbiQ0EkqC/ixfJcU81WD9SqerCWkhGB64juZbB+Nd5HaRIX1mO5tVLvT8g+J8x/hfvLnYdA9PG5sgh+pPMqUzkDt1nOFPi2eDgFJQiVhb/hzlHPzSFPuEcocchzSieWpR0y8yxXV9HLt6OarAigFQzM9dp8HUQdg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350023; c=relaxed/simple; bh=HLO4ork3cmWOwA7GjcrT6kbZJEj1EJFIFeB0r1RV3Zk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IO4aIbEEbIJuRf4ONNsFHeFVcem4MBolWdYHsr1wyRkfd3oycUgzyzfHiYaqCl26N+gFIY2iANyXw+qLzrmQgS4iZA3TPMs4fH/sBc1UVW5s8Sg4KcouvXMOUuyCTsjYlBiFlPhEKuJ3XOlzWhSBc9wVnrM/kBlZqskfRtFy/l4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=iZzLyMvn; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="iZzLyMvn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715350021; x=1746886021; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HLO4ork3cmWOwA7GjcrT6kbZJEj1EJFIFeB0r1RV3Zk=; b=iZzLyMvnBxl6c3sRqUZ3w19FBDdQs6atl3vSpTsaxkeNGgPGrj4a4Zam ACjcZtXfNWHBi8bt+TYP33+f7WYFnxGRumfnELT965lFXTbAULVAsz1kR 3T8yfnTsDNKgWf2HTbMjs/aWRNicG581PCh5hENUvtROo02baXoxIpXGo FdwDAPEJP/mg6LZw887W2LjcVJkKusA9kmgQzR05w6uFfKRBRUSOPZojY NRqmo4bbYrHwShNYiaWjbAWA7c2XJNZ47b92aEcnq7dxu4wDmlmAQG1uT sLR4HfOzGSWnXTsTBjQWt0zJui/A2LkCfvjmhgsW1ibpdbGXI6g5er/JJ w==; X-CSE-ConnectionGUID: fsvXNz9DTrifwQw6pFpv/A== X-CSE-MsgGUID: UPP8BL+pRE6pKq3DTiKeTQ== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="15125547" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15125547" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:01 -0700 X-CSE-ConnectionGUID: VxA7qhgvT4e4whPhEuBlOA== X-CSE-MsgGUID: R0B5vv85Qn+8V4JH16LuXw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="67101854" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:00 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Avraham Stern , Greenman, Gregory Subject: [PATCH 05/14] wifi: iwlwifi: mvm: debugfs: add entry for setting maximum TXOP time Date: Fri, 10 May 2024 17:06:32 +0300 Message-Id: <20240510170500.b8d17a9c1731.I57c33574a61edd68bd0ec1aa7009f31111fd7efe@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> References: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Avraham Stern Add an entry for setting the maximum TXOP time in microseconds. The configured value can be read from the same entry. Signed-off-by: Avraham Stern Reviewed-by: Greenman, Gregory Signed-off-by: Miri Korenblit --- .../wireless/intel/iwlwifi/mvm/debugfs-vif.c | 38 +++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 ++ .../net/wireless/intel/iwlwifi/mvm/rs-fw.c | 3 ++ 3 files changed, 44 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c index 17c97dfbc62a..25f07e00db42 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c @@ -692,6 +692,42 @@ static ssize_t iwl_dbgfs_quota_min_read(struct file *file, return simple_read_from_buffer(user_buf, count, ppos, buf, len); } +static ssize_t iwl_dbgfs_max_tx_op_write(struct ieee80211_vif *vif, char *buf, + size_t count, loff_t *ppos) +{ + struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); + struct iwl_mvm *mvm = mvmvif->mvm; + u16 value; + int ret; + + ret = kstrtou16(buf, 0, &value); + if (ret) + return ret; + + mutex_lock(&mvm->mutex); + mvmvif->max_tx_op = value; + mutex_unlock(&mvm->mutex); + + return count; +} + +static ssize_t iwl_dbgfs_max_tx_op_read(struct file *file, + char __user *user_buf, + size_t count, loff_t *ppos) +{ + struct ieee80211_vif *vif = file->private_data; + struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); + struct iwl_mvm *mvm = mvmvif->mvm; + char buf[10]; + int len; + + mutex_lock(&mvm->mutex); + len = scnprintf(buf, sizeof(buf), "%hu\n", mvmvif->max_tx_op); + mutex_unlock(&mvm->mutex); + + return simple_read_from_buffer(user_buf, count, ppos, buf, len); +} + static ssize_t iwl_dbgfs_int_mlo_scan_write(struct ieee80211_vif *vif, char *buf, size_t count, loff_t *ppos) @@ -801,6 +837,7 @@ MVM_DEBUGFS_READ_WRITE_FILE_OPS(uapsd_misbehaving, 20); MVM_DEBUGFS_READ_WRITE_FILE_OPS(rx_phyinfo, 10); MVM_DEBUGFS_READ_WRITE_FILE_OPS(quota_min, 32); MVM_DEBUGFS_READ_FILE_OPS(os_device_timediff); +MVM_DEBUGFS_READ_WRITE_FILE_OPS(max_tx_op, 10); MVM_DEBUGFS_WRITE_FILE_OPS(int_mlo_scan, 32); MVM_DEBUGFS_READ_WRITE_FILE_OPS(esr_disable_reason, 32); @@ -830,6 +867,7 @@ void iwl_mvm_vif_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif) MVM_DEBUGFS_ADD_FILE_VIF(rx_phyinfo, mvmvif->dbgfs_dir, 0600); MVM_DEBUGFS_ADD_FILE_VIF(quota_min, mvmvif->dbgfs_dir, 0600); MVM_DEBUGFS_ADD_FILE_VIF(os_device_timediff, mvmvif->dbgfs_dir, 0400); + MVM_DEBUGFS_ADD_FILE_VIF(max_tx_op, mvmvif->dbgfs_dir, 0600); debugfs_create_bool("ftm_unprotected", 0200, mvmvif->dbgfs_dir, &mvmvif->ftm_unprotected); MVM_DEBUGFS_ADD_FILE_VIF(int_mlo_scan, mvmvif->dbgfs_dir, 0200); diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 1f58c727fa63..ca1c5944da67 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -426,6 +426,7 @@ struct iwl_mvm_esr_exit { * @csa_bcn_pending: indicates that we are waiting for a beacon on a new channel * @csa_blocks_tx: CSA is blocking TX * @features: hw features active for this vif + * @max_tx_op: max TXOP in usecs for all ACs, zero for no limit. * @ap_beacon_time: AP beacon time for synchronisation (on older FW) * @bf_enabled: indicates if beacon filtering is enabled * @ba_enabled: indicated if beacon abort is enabled @@ -538,6 +539,8 @@ struct iwl_mvm_vif { struct ieee80211_key_conf __rcu *keys[2]; } bcn_prot; + u16 max_tx_op; + u16 link_selection_res; u8 link_selection_primary; u8 primary_link; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c index 3ba62fb2c85e..884fd56e7426 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c @@ -609,6 +609,7 @@ void iwl_mvm_rs_fw_rate_init(struct iwl_mvm *mvm, cpu_to_le16(max_amsdu_len) : 0, }; unsigned int link_id = link_conf->link_id; + struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(mvmsta->vif); int cmd_ver; int ret; @@ -654,6 +655,8 @@ void iwl_mvm_rs_fw_rate_init(struct iwl_mvm *mvm, */ sta->deflink.agg.max_amsdu_len = max_amsdu_len; + cfg_cmd.max_tx_op = cpu_to_le16(mvmvif->max_tx_op); + cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, 0); IWL_DEBUG_RATE(mvm, "TLC CONFIG CMD, sta_id=%d, max_ch_width=%d, mode=%d\n", cfg_cmd.sta_id, cfg_cmd.max_ch_width, cfg_cmd.mode); From patchwork Fri May 10 14:06:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796208 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D2A217165F for ; Fri, 10 May 2024 14:07:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350025; cv=none; b=a+KQthJ3gXftnQE/ZyXZ5XW6Qusbj8+TWPdzMtwvGo8FYJdkJX/BcxzXihnQcPI+NRdZ+1GX5brgUR/xWglR93weh1sQUBPf1vLX1RE9TGpg7VQQW39okkQV4kdOMn+H5im6dqgwohBeXqxCSifmztR3eh401pT7m8cNyMgwU2I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350025; c=relaxed/simple; bh=CQlKQPxOfp8/xPapgHY+mhPBxqVn4qT97bD/6KDVCns=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bbvYemM1qHlBNywvOWNVg6gscGRv4FGk0e4mIunMbz43KhboTl1viShxE47gZVv3sl3so7I6+aeBOG1wMa8Y00uzk8k54BU1QWDOteXll8hORG+3WOrwjIW4aVt3NVYuOdpS5VvnqjNIVGzXyBXGRO2og4RnIR5og0QomsS5Res= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=VydY1lwh; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="VydY1lwh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715350024; x=1746886024; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CQlKQPxOfp8/xPapgHY+mhPBxqVn4qT97bD/6KDVCns=; b=VydY1lwhDTiIz5sXp2yjyfBczbD2NTEHmzmzEp3aRRM5wOvK7P+bZVug iNM+9a2KM/Nx5ngnk+oDoftfCdzOJbwqmaM+T/tdNPHD2k4dqq81yte0D qNzfjd6xlP9+p4VQ/s4JnGSLGEM+DoNfbgGcZ3JjgIBnpLlwWGinhI3C8 Xe7Czr5HjS342j8hBUKcWbmH/3ho6xlS5zzCpzISTToQRItQBBO+2rEuA gxW6pYezl7Aeaq6z4eyslfwvHnmmcrvJ1Kir89y+3g9Tgmap4nQZhTS+n AFnICLfqKqXrSc1B6+/Gouw3UYAf6HQvxfZKSxETaYtBxEYE3YW4z2OfV A==; X-CSE-ConnectionGUID: m5J15w/5QNOqEbSJgCXqIw== X-CSE-MsgGUID: ASpawjAgSyyoLn67e1vYIw== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="15125561" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15125561" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:04 -0700 X-CSE-ConnectionGUID: WY5n7HKuSS+Zl79bACDHng== X-CSE-MsgGUID: tqk7X3pDQ7qMls0XMibFlw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="67101865" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:02 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Kaufman, Liad , Coelho, Luciano Subject: [PATCH 06/14] iwlwifi: mvm: revert gen2 TX A-MPDU size to 64 Date: Fri, 10 May 2024 17:06:33 +0300 Message-Id: <20240510170500.52f7b4cf83aa.If47e43adddf7fe250ed7f5571fbb35d8221c7c47@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> References: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Johannes Berg We don't actually support >64 even for HE devices, so revert back to 64. This fixes an issue where the session is refused because the queue is configured differently from the actual session later. Fixes: 514c30696fbc ("iwlwifi: add support for IEEE802.11ax") Signed-off-by: Johannes Berg Reviewed-by: Kaufman, Liad Reviewed-by: Coelho, Luciano Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/rs.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.h b/drivers/net/wireless/intel/iwlwifi/mvm/rs.h index 376b23b409dc..6cd4ec4d8f34 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.h @@ -122,13 +122,8 @@ enum { #define LINK_QUAL_AGG_FRAME_LIMIT_DEF (63) #define LINK_QUAL_AGG_FRAME_LIMIT_MAX (63) -/* - * FIXME - various places in firmware API still use u8, - * e.g. LQ command and SCD config command. - * This should be 256 instead. - */ -#define LINK_QUAL_AGG_FRAME_LIMIT_GEN2_DEF (255) -#define LINK_QUAL_AGG_FRAME_LIMIT_GEN2_MAX (255) +#define LINK_QUAL_AGG_FRAME_LIMIT_GEN2_DEF (64) +#define LINK_QUAL_AGG_FRAME_LIMIT_GEN2_MAX (64) #define LINK_QUAL_AGG_FRAME_LIMIT_MIN (0) #define LQ_SIZE 2 /* 2 mode tables: "Active" and "Search" */ From patchwork Fri May 10 14:06:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796479 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59AF5171660 for ; Fri, 10 May 2024 14:07:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350026; cv=none; b=bRgX7MXNvMqQk0Zgsie9UcXBPFdHoqCSvY9HVc4yqoqo/yuRzdlF2RBiT6ESJBv8nwwFJh+8tUF9HqzzpONei80NG7SHHVRO+AYLN5cBwzBAceFo6RH734kiA5uoK7tGWzR5L8t6R6IYUiimE9pk9qo07gCk/eHqOgU0As81nck= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350026; c=relaxed/simple; bh=kRd0jDwrY/AVet4fGeuDlJWbZIOPkSzf5UiSS2tYpOg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=q2uMMpLy0xFDKItVbSh8UGShkOQiod/RsTyP8Etz6NKzPDQulzRLRu3z/GZe/VugbPsV88Jt/QHfGlcLdId8AuBrXAUuT+7ycJhg21gtQ/ILlarf+WUFeGK5GHM9DStQb5agAtPHFoKDODAg4+v8oRxTftuXPFR+mSv1iQrOLlA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=LAOgZ6mD; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="LAOgZ6mD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715350025; x=1746886025; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kRd0jDwrY/AVet4fGeuDlJWbZIOPkSzf5UiSS2tYpOg=; b=LAOgZ6mDdbt3c9FEv+ghDcgwv3TA4P3xzWnh8EzoqLYeub3RKVkzVYZw Kh2ThXQZ37wkF+ExMJ1+TEIFVqcVVW0KCgk0CKivjCYKpdZL86UVou7C0 w6c5DO80xQNCKH8hBJfZir9q4xOzY/NdKVnWI07EQPPZIJfHmKyCfo2QE +fVS3+SE8KRnpuWHnNh2GWxKa8CRQYH9AGS64vkrxtbBacVRBD1RDH7sZ Stwfx9++TYULxZKvPsgIy2RDWqdWz/+KHV1IcxBIarDtOmpeFWeefAtBv 1YipMwmZDpfxwibLMoN5+Zl3l/nqfgdFrJYOAruqDeMmmBONKR0urRdAo A==; X-CSE-ConnectionGUID: hMUMQRhBRWWqJ8lPLvpQ+Q== X-CSE-MsgGUID: hxwyQjQcTQOltDjbuGLUNg== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="15125568" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15125568" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:05 -0700 X-CSE-ConnectionGUID: gRKoLEyRT7KIatrNyOUSjg== X-CSE-MsgGUID: 2owrbChbTBeB9MrrDgrG5g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="67101866" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:04 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 07/14] wifi: iwlwifi: mvm: define link_sta in the relevant scope Date: Fri, 10 May 2024 17:06:34 +0300 Message-Id: <20240510170500.e0a1dd285d9a.Id5ff16fb98af0c5f533aed6b5ec3cc856401e488@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> References: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited the link_sta pointer is now only used inside this if, so define it inside its scope. Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index d78af2928152..8bbef4454399 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -2032,7 +2032,6 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, u32 len; u32 pkt_len = iwl_rx_packet_payload_len(pkt); struct ieee80211_sta *sta = NULL; - struct ieee80211_link_sta *link_sta = NULL; struct sk_buff *skb; u8 crypt_len = 0; u8 sta_id = le32_get_bits(desc->status, IWL_RX_MPDU_STATUS_STA_ID); @@ -2185,6 +2184,8 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, if (desc->status & cpu_to_le32(IWL_RX_MPDU_STATUS_SRC_STA_FOUND)) { if (!WARN_ON_ONCE(sta_id >= mvm->fw->ucode_capa.num_stations)) { + struct ieee80211_link_sta *link_sta; + sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); if (IS_ERR(sta)) sta = NULL; From patchwork Fri May 10 14:06:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796207 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7EDC4171677 for ; Fri, 10 May 2024 14:07:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350028; cv=none; b=raB/ExbVtYEXE0CL62IHvFSYKhSyYDxRMhjfy8/9KOQZzNJ14+55jxroUVmA6mJjhk39aD3ahWOZSLTzD2mlGE06pd0qfwd6b5BhlLP69uo/pLSsirfBlNj7Pqj6SmDZ3t7ndjw9kkDoP4EEKXtdAmtnVb3j2gAKywOAFpxFpKE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350028; c=relaxed/simple; bh=PToMZa0wjwpHe0TDHSH5JmgZX8xQJSzZtIeeVkazJ38=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=I5pSiZpXVoVxicCPSQqzUhwtIZOOlFBaBrNXxu4PVxJP3jQ0T4H5WOKp3JcoOOPzwut89P0ZKBKfrODHkrizHXNE8HMqrw0+6GjXmwtpIOcwtjfWDuh3sDyA783wbmIApZbHkg7MKYWjhpQSK3HMIfFjunDl/CscJk4p/Jeke0E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=IqcmRQiL; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="IqcmRQiL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715350027; x=1746886027; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PToMZa0wjwpHe0TDHSH5JmgZX8xQJSzZtIeeVkazJ38=; b=IqcmRQiLLbeq39xSvTRiH5Jfv6CjltxfqpyasDLCBmG5D1YVfSzpnQCb yaeMQzOyi6FoA6ZDWWsHzqsR3T3sDtmUvrEVezmOK3Nj0hvoQZZaJPesr PMB7FRcFzIM2liOspgT7EkdVCYjBybG57K4TjFsMETHNuqIQrdPdqmqIr AhnRl2w5QSgpOU7K/jE+8vwYrPTUlm8xGzR/s7cyfOrGBofI6WZUDiVUC RwW0cyRsDf+FmO10rJEwD8RS3Q4MOHO52tVGByYT5hY0Ydjz2K2MF4Tes 8j5hg14MulKDv57OwqAkw/978jlBO//lmbLcE+hTkFEqXFJgQ6+HxV5f1 g==; X-CSE-ConnectionGUID: RDkS9zXQQTiBJUHn2NdYog== X-CSE-MsgGUID: iBuzlcfVSkqaHXgUzKFacQ== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="15125578" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15125578" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:07 -0700 X-CSE-ConnectionGUID: xsEoVYVzRiG+VolO5smGUw== X-CSE-MsgGUID: 4kwZzdO3TJmU7+0QjXwHUw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="67101879" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:06 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Mordechay Goodstein , Johannes Berg Subject: [PATCH 08/14] wifi: iwlwifi: mvm: set properly mac header Date: Fri, 10 May 2024 17:06:35 +0300 Message-Id: <20240510170500.12f2de2909c3.I72a819b96f2fe55bde192a8fd31a4b96c301aa73@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> References: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Mordechay Goodstein In the driver we only use skb_put* for adding data to the skb, hence data never moves and skb_reset_mac_haeder would set mac_header to the first time data was added and not to mac80211 header, fix this my using the actual len of bytes added for setting the mac header. Fixes: 3f7a9d577d47 ("wifi: iwlwifi: mvm: simplify by using SKB MAC header pointer") Signed-off-by: Mordechay Goodstein Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 8bbef4454399..98a4f6fb3f03 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -2451,8 +2451,11 @@ void iwl_mvm_rx_monitor_no_data(struct iwl_mvm *mvm, struct napi_struct *napi, * * We mark it as mac header, for upper layers to know where * all radio tap header ends. + * + * Since data doesn't move data while putting data on skb and that is + * the only way we use, data + len is the next place that hdr would be put */ - skb_reset_mac_header(skb); + skb_set_mac_header(skb, skb->len); /* * Override the nss from the rx_vec since the rate_n_flags has From patchwork Fri May 10 14:06:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796478 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E9CE171E41 for ; Fri, 10 May 2024 14:07:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350030; cv=none; b=KstMcy+6+/j3fgUAwI7dU0UGuxXBtc9D7k1/ssPIUWkjQlH3iOFpOHwkzkMj8HexpVHWg/IXfLXajfQraC29qdxx962qXhF1SvoHqHr6ntdBVz5joGuE+b53o21wrchd+7+gY3ymo4gbL2byBieD7vbfzKlIl4bby1L5dOUPoMc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350030; c=relaxed/simple; bh=bSCMDDHOlbU7WYyYd9t56ZYseP7YqPy7iQDGD2pBZMM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mA6cIXXL5ZLNz1qtIJID3TL6tzEfnB/zc8CDvwcCJyQND5nAXsAS84ZzFY7uifiwoEvU9QAX6jJ93VR6vxfou5gcCZNavf68OMbdrPLtP0krnO1u60BvgLZ4DvOKTUr+KCC0ArukbOfhsLwfNXl7wugQvTJ9Faekom9lohadWy0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=dHpfyKoN; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="dHpfyKoN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715350029; x=1746886029; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bSCMDDHOlbU7WYyYd9t56ZYseP7YqPy7iQDGD2pBZMM=; b=dHpfyKoNtJXL9M3pIrzT6nec6uDc0unmOSN52K/MC6BjHdm2qe2w37gE el8atNpEYd/z6P4tn4ZW54UVed74zRasYP99CxSi5Qwfba8SP8n5VwHjL UjbP3opKZlKF4XEynYooH1u/ypUaXyZbxfUQFmBK6Vf8me2V4tbv9Vr08 175dJ3oq6GzsRtlTMmcu3+GMnHi9RsAsBcJa1BEmJWjATmHUyU+5t6Ef7 EOKso08jHhDUtTy4LesRHXpgv7+e5NnKvH35Vsqo59v3dvuWmBwOeXAXg DYHK5szwdXO2QkUp4LqVZzpwSWaXQL/WXI3IyEozbQ8T9ZL9V+Zb1iYMA A==; X-CSE-ConnectionGUID: VvV0Nf/9QRutUN+X6UBu/w== X-CSE-MsgGUID: 07vnZpFsRE2kPhjH3ZPo1w== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="15125582" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15125582" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:08 -0700 X-CSE-ConnectionGUID: 1DuAY+ztRbye4MX1nhxF3g== X-CSE-MsgGUID: C6eGGUKPRkukoM4dYNOPIg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="67101880" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:08 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 09/14] wifi: iwlwifi: mvm: set amsdu size to the correct link Date: Fri, 10 May 2024 17:06:36 +0300 Message-Id: <20240510170500.4de5c1a031ca.I063bc1508e5068b32e321b0f268bc51dba0c0747@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> References: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited The exising code sets the max AMSDU size to the deflink, set it to the given link instead. Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c index 884fd56e7426..031b5e70d181 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c @@ -653,7 +653,7 @@ void iwl_mvm_rs_fw_rate_init(struct iwl_mvm *mvm, * since TLC offload works with one mode we can assume * that only vht/ht is used and also set it as station max amsdu */ - sta->deflink.agg.max_amsdu_len = max_amsdu_len; + link_sta->agg.max_amsdu_len = max_amsdu_len; cfg_cmd.max_tx_op = cpu_to_le16(mvmvif->max_tx_op); From patchwork Fri May 10 14:06:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796206 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E96A171E54 for ; Fri, 10 May 2024 14:07:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350031; cv=none; b=FqdVFGtIaTOntdyZAa4nKYsqanSQ65t/9qZKSyW6T3Q1bMic8xm2vNBMEB7wcMlUynxSPnfahdbd66HMr28Wfxa7D1yspVKVX2d8s5fDsK/h1qIwl9Vl0EUelAocaUySJJU1EnzUfJWeZUHUbozBLY4xD4z1/PRKH78bFVaC9UA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350031; c=relaxed/simple; bh=cVl7xL+li1upr2/hoHaQWEvNvL3sO6aaPXd7UJLwUPY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uuZ/QK4EPFXxCWwpHqMl4eKWQd9wv/mwVOpkzaPUzs7osnOYkcT+82hmF2yGrzWaU/DlE5/d2XiuG+nnBsK/iifJN9vqdpe19vsmRWj1uH9jGjOwMQcH/f2MfpdguJlrIo4MIH5A5yxpIPp7QF89Aku7b9SSjtUjf2fjuOKyy7g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=fnvFeQqE; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fnvFeQqE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715350030; x=1746886030; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cVl7xL+li1upr2/hoHaQWEvNvL3sO6aaPXd7UJLwUPY=; b=fnvFeQqElQhw5vvTf/KPSvGi/4rzgmPUF0tiHmdHeeQ+sXeOQ9yP3io2 KnWokuSdS2vxZdxRxlQy0ponGOAmP4ycPLIBq7gdnAUdJPbnoH1HlR0Gg HXlSabIoJVFeOObaQkp5TTqg2Vh37wLx+pnyj9lG68Xa9eLRJsNQaUMY7 lbJ/gYoJsD8sBePFkeMvK12tU+17DBOsI56p+wWh1+tRCloKZanzFWODu DaGjpd0hryfKyAkztkDll+xcKNiTCnRTHzyZeU/SPFb5pj84+UgdE1QjE mGZRLwHNsTA6AWuKC4eeX8yJGLzJ8KWgffn5lfqaHz74xFt/dTUfV7u+d w==; X-CSE-ConnectionGUID: zrPibQ5USAK2TIbYY2Vcpw== X-CSE-MsgGUID: cRGx41aYT/itM2sEjwookw== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="15125587" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15125587" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:09 -0700 X-CSE-ConnectionGUID: BugP9L5eRzGDk4Do97H+tg== X-CSE-MsgGUID: d0Ru8/UMTH6GCg3MzX6hmA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="67101881" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:09 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 10/14] wifi: iwlwifi: mvm: call ieee80211_sta_recalc_aggregates on amsdu size update Date: Fri, 10 May 2024 17:06:37 +0300 Message-Id: <20240510170500.632ee6612a79.Ice3a536a4cbfe60d0edfa231fcb79ee7ab9495dd@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> References: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited The driver needs to call this function when the amsdu size changes. Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c index 031b5e70d181..05715e5af6ab 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c @@ -514,6 +514,8 @@ void iwl_mvm_tlc_update_notif(struct iwl_mvm *mvm, link_sta->agg.max_tid_amsdu_len[i] = 1; } + ieee80211_sta_recalc_aggregates(sta); + IWL_DEBUG_RATE(mvm, "AMSDU update. AMSDU size: %d, AMSDU selected size: %d, AMSDU TID bitmap 0x%X\n", le32_to_cpu(notif->amsdu_size), size, @@ -654,6 +656,7 @@ void iwl_mvm_rs_fw_rate_init(struct iwl_mvm *mvm, * that only vht/ht is used and also set it as station max amsdu */ link_sta->agg.max_amsdu_len = max_amsdu_len; + ieee80211_sta_recalc_aggregates(sta); cfg_cmd.max_tx_op = cpu_to_le16(mvmvif->max_tx_op); From patchwork Fri May 10 14:06:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796477 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F3EE2171E61 for ; Fri, 10 May 2024 14:07:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350033; cv=none; b=K8aTLeEnFAOslWnp6b0I/xY6AYskj3ISexg65xHSmVPoGiAkts6SVqXNkJX26jlxPbOIl2cwUOfHqqMEXCybPteF4ApvAGdcE7a2e4xdX+w39ejMmbwzH6bBpmdWrMnHQmRGEY2UMNdEiHXyF4PxSo47lu9B4HwtMjXhUMUs72w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350033; c=relaxed/simple; bh=QSc/7E5BhoUPb8uyhk1R27PsivVec6FiuYt5YixMIhU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UE5uIrl54C0fYSRtObbA9C9p65UAp7E2tnEsvWZk8OA2UO72oX4XcnNBh4qMtO+cZUi3XT09JUA8qtXqLuQBDKMNk/C/m4fGXB39UE+OGwapR1LSNHGIxxCQz/y9iM+2O8pbGsHBd233CFXKaJJO2DZbtYegWQtP0xWtbrxt2Y4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NRGi0tiO; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NRGi0tiO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715350032; x=1746886032; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QSc/7E5BhoUPb8uyhk1R27PsivVec6FiuYt5YixMIhU=; b=NRGi0tiOZCw72u1vxp3Kqo0kin4cHpgmwzMabfKx3ADpU10wzwjEpmza VFL0obE4SacWC54mOuWTjWXKAVIsUVWs1S628baKilEdAcEHaFP+JTQTr Eu/r3t9NbszkvyVHY25aAKxRZ6b15pBGhP+2x7SHCCSQA2nAgIGsNbVG9 zMiHMYv9kwFtsZ2uU0fqtGCdb8PicbBqQdnYbjXjU1ri/JDPXP0GRR6ud qqW3CgWJN4tWUeeUnnG9CIbMbLXVwafWaGcH95K7yYQioTlkfcf8X9V8T /JNo8mcRWh0z87CqEGU7GTlnepeeLHCBAEsdMXXP9bs4RSWIKeNHLt35H A==; X-CSE-ConnectionGUID: uS5+TMbRTsuA1dNnnpU2rA== X-CSE-MsgGUID: XYodZbBqQIi44DNIXeLKaQ== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="15125595" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15125595" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:11 -0700 X-CSE-ConnectionGUID: te6+elvUQqK602VZqnE96Q== X-CSE-MsgGUID: iVe8kYeTTtWl4gIREmB+NQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="67101895" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:10 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Andrei Otcheretianski , Luciano Coelho Subject: [PATCH 11/14] wifi: iwlwifi: mvm: Don't set NO_HT40+/- flags on 6 GHz band Date: Fri, 10 May 2024 17:06:38 +0300 Message-Id: <20240510170500.b0d51b2229f8.I092e21cde43320ffc2eff17f5748ff9c87c87fcf@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> References: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Andrei Otcheretianski These flags are not needed on 6 GHz channels, and anyway they were set incorrectly. This in turn resulted in alternating channel flags, preventing reg domain rules to be merged together, so cfg80211 couldn't even send them to the user space, as the regulatory domain was too large. Fix it. Signed-off-by: Andrei Otcheretianski Reviewed-by: Luciano Coelho Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c index 149903f52567..cf5c9500af8c 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c @@ -1625,11 +1625,15 @@ static u32 iwl_nvm_get_regdom_bw_flags(const u16 *nvm_chan, flags &= ~NL80211_RRF_NO_HT40PLUS; if (nvm_chan[ch_idx] >= FIRST_2GHZ_HT_MINUS) flags &= ~NL80211_RRF_NO_HT40MINUS; - } else if (nvm_flags & NVM_CHANNEL_40MHZ) { + } else if (ch_idx < NUM_2GHZ_CHANNELS + NUM_5GHZ_CHANNELS && + nvm_flags & NVM_CHANNEL_40MHZ) { if ((ch_idx - NUM_2GHZ_CHANNELS) % 2 == 0) flags &= ~NL80211_RRF_NO_HT40PLUS; else flags &= ~NL80211_RRF_NO_HT40MINUS; + } else if (nvm_flags & NVM_CHANNEL_40MHZ) { + flags &= ~NL80211_RRF_NO_HT40PLUS; + flags &= ~NL80211_RRF_NO_HT40MINUS; } if (!(nvm_flags & NVM_CHANNEL_80MHZ)) From patchwork Fri May 10 14:06:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796205 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51853171E69 for ; Fri, 10 May 2024 14:07:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350034; cv=none; b=m8VL5z2gLG/hy1a7Gh2UWD+NFaH3gCKkiaihHcyxf+7IUa5ZtKGbSEhNYCDfZwSFdojBqiX0rTVTcu2snq+E9dzKrJEgqEQCxnsGIurdmJT4fanN0ESQ8CS5XSkvXKCNYs8zRYrTCnF8oiItcXCzmvuatS1NKqtgod6TzAyMFBw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350034; c=relaxed/simple; bh=PiIqq6yArVgDmLRf9jFoejr7pGAJ8ecUyKiCbxu22jY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CWrAf7gHG4NytoqchCg+RdfE/Gz0Q9Podye3VdXJcLIZe84CYoWn440P882RB8BwKRmnenqMXJIeZyMiEdRblMOpVawwk+nDlTvFZu6u9fs8IMqmvpoTk5K9MjoVldmPkdGk2X24YZxxfq4IXhAjtcHTLjEUwqBklahAB0E37J4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=DkuYjKJy; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="DkuYjKJy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715350033; x=1746886033; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PiIqq6yArVgDmLRf9jFoejr7pGAJ8ecUyKiCbxu22jY=; b=DkuYjKJyx9ts7FaQYFWEK388iWFUFTAAHuf9iMA4TUXeCexCFPSx+XTq n9dDAC1EcHymkq/P7en+31545THM1AOAXt/KGmG5mzDW2goGab/4lXf5E 1w3VYbDkBbX9dMMDSYjUdG+bOHtuG0UIyfszWtEBIbpgSxaXBT10zNrKD sNZ22pd7XU3o6p8bWESConuuCOtZJvF2lRw49/c5yIYL92e52Woz5l/i+ 4MkiNX20sp1fzVtTG5I8p4QR6FIfhvxWQbpH7woNH4frItUo96FyDTwQ6 kIidk2YEzIrk1Ig7qRZ/gDHahldC/v58Up1LAI6a0U1zdpKM2L4eMP+yp w==; X-CSE-ConnectionGUID: i0RM6dKLTDCjcxntzVmbDQ== X-CSE-MsgGUID: sj29NyWJRqqaeqlu30HTPg== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="15125616" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15125616" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:13 -0700 X-CSE-ConnectionGUID: 0QywtXvtTACBDMtLIfSalw== X-CSE-MsgGUID: 4N+ivUqqRLSXTqOxRz3huA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="67101905" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:12 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Shahar S Matityahu , Luciano Coelho Subject: [PATCH 12/14] iwlwifi: dbg_ini: move iwl_dbg_tlv_free outside of debugfs ifdef Date: Fri, 10 May 2024 17:06:39 +0300 Message-Id: <20240510170500.c8e3723f55b0.I5e805732b0be31ee6b83c642ec652a34e974ff10@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> References: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Shahar S Matityahu The driver should call iwl_dbg_tlv_free even if debugfs is not defined since ini mode does not depend on debugfs ifdef. Fixes: 68f6f492c4fa ("iwlwifi: trans: support loading ini TLVs from external file") Signed-off-by: Shahar S Matityahu Reviewed-by: Luciano Coelho Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c index ec756e50091d..caa9b9187794 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c @@ -1823,8 +1823,8 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans) err_fw: #ifdef CONFIG_IWLWIFI_DEBUGFS debugfs_remove_recursive(drv->dbgfs_drv); - iwl_dbg_tlv_free(drv->trans); #endif + iwl_dbg_tlv_free(drv->trans); kfree(drv); err: return ERR_PTR(ret); From patchwork Fri May 10 14:06:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796476 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23050172799 for ; Fri, 10 May 2024 14:07:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350036; cv=none; b=g2F68ln0wr/EeNi0sjXJRe1bm/8/prAUoufflakhPOUdnyMsUj8En336iwrMA53/+AHbaY9Ww7l/cAz7WkraZUpM9zpOe4USfyq5MhY4u8iTkg+Mx7Mmfe3fSlp1vMJ4AxmkbBSxliDG+KmKKnAuTRd+EGyqu3BTi6lXCznNBd8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350036; c=relaxed/simple; bh=OMXDzdUn332TT8eWLgMaC7FaoUKdgjTVDtwFY7O9mXM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=URjUWKkZtmxS35u5Gciplo4mkoi6f3Kmjnp+11oCNZH6GCQr72A7sco1FyOuN8WwZafMKvi9FMf5f3+fqlly9qDZUv8y3MKZY9G8Xwmi3XIEqQuJo3ol9FJaoedK+2ERQGMy2Hqnu+IypJAEKBb8yfltXqEW0ktyXvCGNfhmNS8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=d5OmxBUC; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="d5OmxBUC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715350035; x=1746886035; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OMXDzdUn332TT8eWLgMaC7FaoUKdgjTVDtwFY7O9mXM=; b=d5OmxBUCbo60aBdsiyWPYw0erPBxoGsmscjn4CHJEXg1licJXKy6qo1U p4CtCE2E6xMZbOHDU5tfOcID7KNlWbp+4XJVfYe2GlT7OCDyUcdvDv0yB mfYBDs/nZ3n/0sa18oVDiZ20km/PNVH4Ockqx0ph23WB2M77YC35eiKAL o4qxor9MEDirMYdO7VstEKT+EsWA7BEKxQJorNn5vGsm1NvO+wiTBkvXc WsM2s/4zx5DboonBGyS98Uof+jtUGhW3Nv6UfZ/PHpgumNLujNEp4Z/kh hezVLeDaXZICylUsYTL7X+z+Fh1WYyG1ihv3e/fwe+EmgjC6ittmhK3BD Q==; X-CSE-ConnectionGUID: fG2H9WTGQcCREBj34ghWpw== X-CSE-MsgGUID: eeKFZiaeSumrCkkHAdRvDA== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="15125649" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15125649" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:15 -0700 X-CSE-ConnectionGUID: cNVXgoa2Q5iFTpCjV18yJQ== X-CSE-MsgGUID: 6pSkuJA7Rgipb5PfeW0WMQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="67101914" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:13 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Shahar S Matityahu , Coelho, Luciano , Emmanuel Grumbach Subject: [PATCH 13/14] wifi: iwlwifi: remove fw_running op Date: Fri, 10 May 2024 17:06:40 +0300 Message-Id: <20240510170500.ca07138cedeb.I090e31d3eaeb4ba19f5f84aba997ccd36927e9ac@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> References: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Shahar S Matityahu fw_running assumes that memory can be retrieved only after alive. This assumption is no longer true as we support dump before alive. To avoid invalid access to the NIC, check that STATUS_DEVICE_ENABLED bit in trans status is set before dumping instead of the prior check. Signed-off-by: Shahar S Matityahu Reviewed-by: Coelho, Luciano Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/fw/debugfs.c | 3 +-- drivers/net/wireless/intel/iwlwifi/fw/runtime.h | 1 - drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 6 ------ 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c index 751a125a1566..893b21fcaf87 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c @@ -230,8 +230,7 @@ static ssize_t iwl_dbgfs_send_hcmd_write(struct iwl_fw_runtime *fwrt, char *buf, .data = { NULL, }, }; - if (fwrt->ops && fwrt->ops->fw_running && - !fwrt->ops->fw_running(fwrt->ops_ctx)) + if (!iwl_trans_fw_running(fwrt->trans)) return -EIO; if (count < header_size + 1 || count > 1024 * 4) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/runtime.h b/drivers/net/wireless/intel/iwlwifi/fw/runtime.h index 9122f9a1260a..d201440066ea 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/runtime.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/runtime.h @@ -19,7 +19,6 @@ struct iwl_fw_runtime_ops { void (*dump_start)(void *ctx); void (*dump_end)(void *ctx); - bool (*fw_running)(void *ctx); int (*send_hcmd)(void *ctx, struct iwl_host_cmd *host_cmd); bool (*d3_debug_enable)(void *ctx); }; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index 53283d052e18..f19577474f4b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c @@ -770,11 +770,6 @@ static void iwl_mvm_fwrt_dump_end(void *ctx) mutex_unlock(&mvm->mutex); } -static bool iwl_mvm_fwrt_fw_running(void *ctx) -{ - return iwl_mvm_firmware_running(ctx); -} - static int iwl_mvm_fwrt_send_hcmd(void *ctx, struct iwl_host_cmd *host_cmd) { struct iwl_mvm *mvm = (struct iwl_mvm *)ctx; @@ -795,7 +790,6 @@ static bool iwl_mvm_d3_debug_enable(void *ctx) static const struct iwl_fw_runtime_ops iwl_mvm_fwrt_ops = { .dump_start = iwl_mvm_fwrt_dump_start, .dump_end = iwl_mvm_fwrt_dump_end, - .fw_running = iwl_mvm_fwrt_fw_running, .send_hcmd = iwl_mvm_fwrt_send_hcmd, .d3_debug_enable = iwl_mvm_d3_debug_enable, }; From patchwork Fri May 10 14:06:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796204 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48724172BD4 for ; Fri, 10 May 2024 14:07:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350038; cv=none; b=Yy3lZGbHc06f9gRzWXz08Ge4qTCw+11Zeq8JdErn1iCYXAoLHy3p9zPMRukhFBs8u+umEvamm7Cc342x5gLHTv7k1UW9ih9idrg/aGEmNl0CHELyw0lujU+bZPsA4tZFdc3336BhirR0ZKdxc/f75QTT2GqFQHz5Hm95u5I/ob4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715350038; c=relaxed/simple; bh=fG0hJAliBinyFWwSFooXkKjRJAJIK0JjWHWVVkzI6Wc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XLW77Lm/XEOLfxoWj8I9ngDSmg+7WS1LqU/zabp4sMvF1adqo6KLDR5ZNkyuiclrq+NOwfiKo7FGjwkkyLXMV2mOr1Ai1UCLP/gMlVHF0d7GUqrtcHJ/3wMGodIRp5rqftiLVKNkr1MdA+uXiGm21RqwntNrnd5a0smjuSxqU2U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=JNLXfAL0; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="JNLXfAL0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715350037; x=1746886037; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fG0hJAliBinyFWwSFooXkKjRJAJIK0JjWHWVVkzI6Wc=; b=JNLXfAL0yD+2xLvV7xKGGp7DhbjFTKkn9fSTlXZrj+dOtEQNkKb1CbcO l+OQP85NHEz/QZLvJ6qUK2sxt07uRswAeTOyVEfXcSqmBZSlxt2N7PIBI sxnU3NiukdyNoRH+SxF4WBY3oyeiLkRTOPusv8SgDvz82ApZ1M7r+iAhw iHZLWjeBbt/ug0+rdu382KWV8S6XuguhGtSweJFLQEmOoUP62iXB0mdw0 KAxK5PEyrQFtTMz0wrujTtCzG9j8kFhVN67IK5giooeyBxwE1OJg+OEJT NhkVtxl+hPCLtgWEuHVBsE5jiNOfZaAeruOfaFkTYRNBfa+pK+LUKv43A A==; X-CSE-ConnectionGUID: LNkiTGCVQu6Y+BtxJK16Tg== X-CSE-MsgGUID: Tm+RcXlRT6OHr5S9qfxfAw== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="15125657" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15125657" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:17 -0700 X-CSE-ConnectionGUID: EqPTLMQJQ9mfatgndfijIw== X-CSE-MsgGUID: W1C+huF+Q6CVrnFCGqO3Ag== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="67101923" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 07:07:16 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Chaya Rachel Ivgi , Coelho, Luciano Subject: [PATCH 14/14] iwlwifi: remove redundant reading from NVM file Date: Fri, 10 May 2024 17:06:41 +0300 Message-Id: <20240510170500.c4d1a4571049.I7d7b73dccb793e220f023e0d049b082b043ca95e@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> References: <20240510140641.1895860-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Chaya Rachel Ivgi The driver reads xtal_calib from NVM file, but actually never uses it. This is only used in dvm driver. Signed-off-by: Chaya Rachel Ivgi Reviewed-by: Coelho, Luciano Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c index cf5c9500af8c..5132964661c8 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c @@ -38,16 +38,13 @@ enum nvm_offsets { N_HW_ADDRS = 3, NVM_CHANNELS = 0x1E0 - NVM_SW_SECTION, - /* NVM calibration section offset (in words) definitions */ - NVM_CALIB_SECTION = 0x2B8, - XTAL_CALIB = 0x316 - NVM_CALIB_SECTION, - /* NVM REGULATORY -Section offset (in words) definitions */ NVM_CHANNELS_SDP = 0, }; enum ext_nvm_offsets { /* NVM HW-Section offset (in words) definitions */ + MAC_ADDRESS_OVERRIDE_EXT_NVM = 1, /* NVM SW-Section offset (in words) definitions */ @@ -1574,9 +1571,6 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, ®ulatory[NVM_CHANNELS_SDP] : &nvm_sw[NVM_CHANNELS]; - /* in family 8000 Xtal calibration values moved to OTP */ - data->xtal_calib[0] = *(nvm_calib + XTAL_CALIB); - data->xtal_calib[1] = *(nvm_calib + XTAL_CALIB + 1); lar_enabled = true; } else { u16 lar_offset = data->nvm_version < 0xE39 ?