We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07328d9 commit b5007b5Copy full SHA for b5007b5
subsys/net/l2/wifi/wifi_nm.c
@@ -115,6 +115,12 @@ int wifi_nm_register_mgd_type_iface(struct wifi_nm_instance *nm,
115
116
k_mutex_lock(&wifi_nm_lock, K_FOREVER);
117
for (int i = 0; i < CONFIG_WIFI_NM_MAX_MANAGED_INTERFACES; i++) {
118
+ if ((nm->mgd_ifaces[i].iface == iface)
119
+ && (nm->mgd_ifaces[i].type == BIT(type))) {
120
+ k_mutex_unlock(&wifi_nm_lock);
121
+ return 0;
122
+ }
123
+
124
if (!nm->mgd_ifaces[i].iface) {
125
nm->mgd_ifaces[i].iface = iface;
126
nm->mgd_ifaces[i].type = BIT(type);
0 commit comments