On Thu, 2013-02-07 at 19:38 +0100, Simon Wunderlich wrote: > To remove the dependency to rtnl_lock() for > ieee80211_vif_use/release_channel in AP mode, protect the AP_VLAN > list with local->iflist_mtx instead. > > RTNL can not be used from within mac80211 workers, but the > DFS AP interface requires to release channels (after DFS channel > availability checks). I have to say ... I don't like this churn. > @@ -934,12 +936,14 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, > */ > sdata->control_port_protocol = params->crypto.control_port_ethertype; > sdata->control_port_no_encrypt = params->crypto.control_port_no_encrypt; > + mutex_lock(&sdata->local->iflist_mtx); > list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) { > vlan->control_port_protocol = > params->crypto.control_port_ethertype; > vlan->control_port_no_encrypt = > params->crypto.control_port_no_encrypt; > } > + mutex_unlock(&sdata->local->iflist_mtx); > > sdata->vif.bss_conf.beacon_int = params->beacon_interval; > sdata->vif.bss_conf.dtim_period = params->dtim_period; > @@ -972,8 +976,10 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, > ieee80211_bss_info_change_notify(sdata, changed); > > netif_carrier_on(dev); > + mutex_lock(&sdata->local->iflist_mtx); > list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) > netif_carrier_on(vlan->dev); > + mutex_unlock(&sdata->local->iflist_mtx); Things like this are also questionable -- it still only works because the RTNL is there. I'm not sure what the solution would be though -- maybe allowing/using both locks. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html