|
@@ -870,12 +870,50 @@ struct wireless_dev *wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
+#if defined(WLAN_FEATURE_11BE_MLO)
|
|
|
+/**
|
|
|
+ * hdd_deinit_mlo_interfaces() - De-initialize link adapters
|
|
|
+ * @hdd_ctx: Pointer to hdd context
|
|
|
+ * @adapter: Pointer to adapter
|
|
|
+ * @rtnl_held: rtnl lock
|
|
|
+ *
|
|
|
+ * Return: None
|
|
|
+ */
|
|
|
+static void hdd_deinit_mlo_interfaces(struct hdd_context *hdd_ctx,
|
|
|
+ struct hdd_adapter *adapter,
|
|
|
+ bool rtnl_held)
|
|
|
+{
|
|
|
+ int i;
|
|
|
+ struct hdd_mlo_adapter_info *mlo_adapter_info;
|
|
|
+ struct hdd_adapter *link_adapter;
|
|
|
+
|
|
|
+ mlo_adapter_info = &adapter->mlo_adapter_info;
|
|
|
+ for (i = 0; i < WLAN_MAX_MLD; i++) {
|
|
|
+ link_adapter = mlo_adapter_info->link_adapter[i];
|
|
|
+ if (!link_adapter)
|
|
|
+ continue;
|
|
|
+ hdd_deinit_adapter(hdd_ctx, link_adapter, rtnl_held);
|
|
|
+ }
|
|
|
+}
|
|
|
+#else
|
|
|
+static inline
|
|
|
+void hdd_deinit_mlo_interfaces(struct hdd_context *hdd_ctx,
|
|
|
+ struct hdd_adapter *adapter,
|
|
|
+ bool rtnl_held)
|
|
|
+{
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
void hdd_clean_up_interface(struct hdd_context *hdd_ctx,
|
|
|
struct hdd_adapter *adapter)
|
|
|
{
|
|
|
wlan_hdd_release_intf_addr(hdd_ctx,
|
|
|
adapter->mac_addr.bytes);
|
|
|
hdd_stop_adapter(hdd_ctx, adapter);
|
|
|
+ if (hdd_adapter_is_ml_adapter(adapter)) {
|
|
|
+ hdd_deinit_mlo_interfaces(hdd_ctx, adapter, true);
|
|
|
+ hdd_wlan_unregister_mlo_interfaces(adapter, true);
|
|
|
+ }
|
|
|
hdd_deinit_adapter(hdd_ctx, adapter, true);
|
|
|
hdd_close_adapter(hdd_ctx, adapter, true);
|
|
|
}
|