mac80211_hwsim: fix duplicate beacons on TSF adjust

There was some bug when rescheduling the next beacon from
the beacon tasklet after adjusting TSF which would cause
the beacon timer to trigger twice. Beaconing at "old" TBT
(previously scheduled interface TBTT) with new timestamp
was incorrect anyway.

Instead, reschedule the beacon straight away when
adjusting TSF.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
mac80211: reset TSF to 0 when joining a mesh

This should ensure the mac80211 DTIM count matches that of
the firmware beacon timer (DTIM 0 starts at TSF 0).

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
mac80211: update adjusting TBTT bit in beacon

This regression was introduced in "mac80211: cache mesh
beacon". Earlier

There was an assumption that the beacon would be rebuilt
in every single pre-tbtt interrupt, but now the beacon
update happens on the workqueue..

Save a pointer to the meshconf IE in the beacon_data (this
works because both the IE pointer and beacon buffer are
protected by the same rcu_{dereference,assign_pointer}())
for quick updates during pre-tbtt. This is faster and a
little prettier than iterating over the elements to find
the meshconf IE every time.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>