cfg80211: allow registering more than one beacon listener

The commit:

commit 5e760230e4
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Fri Nov 4 11:18:17 2011 +0100

    cfg80211: allow registering to beacons

allowed only a single process to register for beacon events
per wiphy.  This breaks cases where a user may want two or
more VIFs on a wiphy and run a seperate hostapd process on
each vif.

This patch allows multiple beacon listeners, fixing the
regression.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Ben Greear
2012-10-26 14:49:25 -07:00
committed by Johannes Berg
parent 391e53e33f
commit 37c73b5f32
5 changed files with 76 additions and 33 deletions

View File

@@ -55,7 +55,8 @@ struct cfg80211_registered_device {
int opencount; /* also protected by devlist_mtx */
wait_queue_head_t dev_wait;
u32 ap_beacons_nlportid;
struct list_head beacon_registrations;
spinlock_t beacon_registrations_lock;
/* protected by RTNL only */
int num_running_ifaces;
@@ -260,6 +261,10 @@ enum cfg80211_chan_mode {
CHAN_MODE_EXCLUSIVE,
};
struct cfg80211_beacon_registration {
struct list_head list;
u32 nlportid;
};
/* free object */
extern void cfg80211_dev_free(struct cfg80211_registered_device *rdev);