提交 4ebdce1d 编写于 作者: J Johannes Berg

mac80211: simplify ieee80211_add_station()

There's no need to do some kind of weird err and RCU dance
just use sta_info_insert() directly.

Link: https://lore.kernel.org/r/20210517230754.55abd10056c0.I6f5a3b7b23347b2cdaf64e6d5ce1d9e904059654@changeidSigned-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 f057d140
......@@ -1693,15 +1693,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
test_sta_flag(sta, WLAN_STA_ASSOC))
rate_control_rate_init(sta);
err = sta_info_insert_rcu(sta);
if (err) {
rcu_read_unlock();
return err;
}
rcu_read_unlock();
return 0;
return sta_info_insert(sta);
}
static int ieee80211_del_station(struct wiphy *wiphy, struct net_device *dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册