static int ieee80211_reconfig_nan(struct ieee80211_sub_if_data *sdata)
{
+ struct ieee80211_local *local = sdata->local;
+ struct ieee80211_sub_if_data *ndi_sdata;
int res;
- res = drv_start_nan(sdata->local, sdata,
- &sdata->u.nan.conf);
+ res = drv_start_nan(local, sdata, &sdata->u.nan.conf);
if (WARN_ON(res))
return res;
drv_vif_cfg_changed(sdata->local, sdata, BSS_CHANGED_NAN_LOCAL_SCHED);
+ /* Now we can add all the NDIs to the driver */
+ list_for_each_entry(ndi_sdata, &local->interfaces, list) {
+ if (ndi_sdata->vif.type == NL80211_IFTYPE_NAN_DATA) {
+ res = drv_add_interface(local, ndi_sdata);
+ if (WARN_ON(res))
+ return res;
+ }
+ }
+
return 0;
}
if (sdata->vif.type == NL80211_IFTYPE_MONITOR &&
!ieee80211_hw_check(&local->hw, NO_VIRTUAL_MONITOR))
continue;
+ /* These vifs can't be added before NAN was started */
+ if (sdata->vif.type == NL80211_IFTYPE_NAN_DATA)
+ continue;
if (sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
ieee80211_sdata_running(sdata)) {
res = drv_add_interface(local, sdata);
if (sdata->vif.type == NL80211_IFTYPE_MONITOR &&
!ieee80211_hw_check(&local->hw, NO_VIRTUAL_MONITOR))
continue;
+ if (sdata->vif.type == NL80211_IFTYPE_NAN_DATA)
+ continue;
if (sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
ieee80211_sdata_running(sdata))
drv_remove_interface(local, sdata);