On Mon, 2012-06-25 at 18:20 +0300, Eliad Peller wrote: > > +void cfg80211_unregister_wdev(struct wireless_dev *wdev) > > + case NL80211_IFTYPE_P2P_DEVICE: > > + if (wdev->p2p_started) { > > + wdev->p2p_started = false; > > + rdev->opencount--; > > + } > any reason not calling stop_p2p_device() here as well? That would be circular? You're supposed to call this when stop_p2p_device() gets called, or when you need to delete it for some other reason, usually device unplug or such. > > +static int nl80211_start_p2p_device(struct sk_buff *skb, struct genl_info *info) > > +{ > > + struct cfg80211_registered_device *rdev = info->user_ptr[0]; > > + struct wireless_dev *wdev = info->user_ptr[1]; > > + int err; > > + > > + if (!rdev->ops->start_p2p_device) > > + return -EOPNOTSUPP; > > + > > + if (wdev->iftype != NL80211_IFTYPE_P2P_DEVICE) > > + return -EOPNOTSUPP; > > + > > + if (!(rdev->wiphy.interface_modes & BIT(NL80211_IFTYPE_P2P_DEVICE))) > > + return -EOPNOTSUPP; > > + > nl80211_new_interface() should already check it. Good point. I'll remove this check. 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