wifi: cfg80211: Set SSID if it is not already set
authorMarc Bornand <dev.mbornand@systemb.ch>
Wed, 15 Feb 2023 08:47:53 +0000 (08:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:22 +0000 (09:34 +0100)
commitdd43f8f90206054e7da7593de0a334fb2cd0ea88
treefefc6a1cae0f497c2855992d434b44f08577f3f6
parent22dfb21bf1cd876616d45cda1bc6daa89eec6747
wifi: cfg80211: Set SSID if it is not already set

commit c38c701851011c94ce3be1ccb3593678d2933fd8 upstream.

When a connection was established without going through
NL80211_CMD_CONNECT, the ssid was never set in the wireless_dev struct.
Now we set it in __cfg80211_connect_result() when it is not already set.

When using a userspace configuration that does not call
cfg80211_connect() (can be checked with breakpoints in the kernel),
this patch should allow `networkctl status device_name` to output the
SSID instead of null.

Cc: stable@vger.kernel.org
Reported-by: Yohan Prod'homme <kernel@zoddo.fr>
Fixes: 7b0a0e3c3a88 (wifi: cfg80211: do some rework towards MLO link APIs)
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216711
Signed-off-by: Marc Bornand <dev.mbornand@systemb.ch>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/wireless/sme.c