--- zzzz-none-000/linux-5.15.111/net/wireless/mlme.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-atom-6670-761/linux-5.15.111/net/wireless/mlme.c 2024-02-07 10:23:31.000000000 +0000 @@ -96,7 +96,12 @@ !ether_addr_equal(wdev->current_bss->pub.bssid, bssid)) return; +#ifndef CFG80211_PROP_MULTI_LINK_SUPPORT __cfg80211_disconnected(wdev->netdev, NULL, 0, reason_code, from_ap); +#else /* CFG80211_PROP_MULTI_LINK_SUPPORT */ + __cfg80211_disconnected(wdev->netdev, NULL, 0, reason_code, from_ap, + NL80211_MLO_INVALID_LINK_ID); +#endif /* CFG80211_PROP_MULTI_LINK_SUPPORT */ cfg80211_sme_deauth(wdev); } @@ -117,7 +122,12 @@ !ether_addr_equal(wdev->current_bss->pub.bssid, bssid))) return; +#ifndef CFG80211_PROP_MULTI_LINK_SUPPORT __cfg80211_disconnected(wdev->netdev, NULL, 0, reason_code, from_ap); +#else /* CFG80211_PROP_MULTI_LINK_SUPPORT */ + __cfg80211_disconnected(wdev->netdev, NULL, 0, reason_code, from_ap, + NL80211_MLO_INVALID_LINK_ID); +#endif /* CFG80211_PROP_MULTI_LINK_SUPPORT */ cfg80211_sme_disassoc(wdev); } @@ -736,23 +746,33 @@ } if (!ether_addr_equal(mgmt->sa, wdev_address(wdev))) { - /* Allow random TA to be used with Public Action frames if the - * driver has indicated support for this. Otherwise, only allow - * the local address to be used. - */ - if (!ieee80211_is_action(mgmt->frame_control) || - mgmt->u.action.category != WLAN_CATEGORY_PUBLIC) - return -EINVAL; - if (!wdev->current_bss && - !wiphy_ext_feature_isset( - &rdev->wiphy, - NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA)) - return -EINVAL; - if (wdev->current_bss && - !wiphy_ext_feature_isset( - &rdev->wiphy, - NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED)) - return -EINVAL; + if (!ieee80211_is_auth(mgmt->frame_control)) { + /* Allow random TA to be used with Public Action frames if the + * driver has indicated support for this. Otherwise, only allow + * the local address to be used. + */ + if (!ieee80211_is_action(mgmt->frame_control) || + mgmt->u.action.category != WLAN_CATEGORY_PUBLIC) + return -EINVAL; + if (!wdev->current_bss && + !wiphy_ext_feature_isset( + &rdev->wiphy, + NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA)) + return -EINVAL; + if (wdev->current_bss && + !wiphy_ext_feature_isset( + &rdev->wiphy, + NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED)) + return -EINVAL; + } else { + /* Allow random TA to be used with authentication frames if the + * driver has indicated support for this. Otherwise, only allow + * the local address to be used. + */ + if (!wiphy_ext_feature_isset(&rdev->wiphy, + NL80211_EXT_FEATURE_AUTH_TX_RANDOM_TA)) + return -EINVAL; + } } /* Transmit the Action frame as requested by user space */