cfg80211: simplify netlink socket owner interface deletion

There's no need to allocate a portid structure and then, for
each of those, walk the interfaces - we can just add a flag
to each interface and walk those directly. Due to padding in
the struct, we can even do it without any memory cost, and
it even simplifies the code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg
2017-04-26 07:43:41 +02:00
parent 127f60bfa9
commit ab81007a7b
4 changed files with 13 additions and 49 deletions

View File

@@ -3988,6 +3988,7 @@ struct cfg80211_cqm_config;
* @event_list: (private) list for internal event processing
* @event_lock: (private) lock for event list
* @owner_nlportid: (private) owner socket port ID
* @nl_owner_dead: (private) owner socket went away
* @cqm_config: (private) nl80211 RSSI monitor state
*/
struct wireless_dev {
@@ -4037,12 +4038,13 @@ struct wireless_dev {
u32 ap_unexpected_nlportid;
u32 owner_nlportid;
bool nl_owner_dead;
bool cac_started;
unsigned long cac_start_time;
unsigned int cac_time_ms;
u32 owner_nlportid;
#ifdef CONFIG_CFG80211_WEXT
/* wext data */
struct {