nl80211: Add SOCKET_OWNER support to JOIN_IBSS
Signed-off-by: Denis Kenzior <denkenz@gmail.com> [johannes: fix race with wdev lock/unlock by just acquiring once] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:

committed by
Johannes Berg

parent
37b1c00468
commit
f8d16d3edb
@@ -8679,9 +8679,14 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info)
|
||||
ibss.userspace_handles_dfs =
|
||||
nla_get_flag(info->attrs[NL80211_ATTR_HANDLE_DFS]);
|
||||
|
||||
err = cfg80211_join_ibss(rdev, dev, &ibss, connkeys);
|
||||
wdev_lock(dev->ieee80211_ptr);
|
||||
err = __cfg80211_join_ibss(rdev, dev, &ibss, connkeys);
|
||||
if (err)
|
||||
kzfree(connkeys);
|
||||
else if (info->attrs[NL80211_ATTR_SOCKET_OWNER])
|
||||
dev->ieee80211_ptr->conn_owner_nlportid = info->snd_portid;
|
||||
wdev_unlock(dev->ieee80211_ptr);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user