iwlwifi: mvm: dynamically update tsf_id
authorIlan Peer <ilan.peer@intel.com>
Mon, 23 Dec 2013 20:18:02 +0000 (22:18 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 31 Dec 2013 17:03:51 +0000 (19:03 +0200)
commit6e97b0d2984a7f80b1d6ba4f62d84d2ce8106069
treefeb73bba7868215615907fe50e0c063a4ad75d70
parent9f8f8ca580b6108c8377469dfaaf91940dcc356a
iwlwifi: mvm: dynamically update tsf_id

Currently, the MAC context tsf_id assignment and the master/slave
relations are determined only when a new vif is added, as part
of the MAC context resource allocation. However, at this stage, the
beacon interval is not known, and thus could not be taken into account
in the master-slave algorithm.

To fix this, recalculate the MAC context tsf_id assignment,
just before the MAC context is activated, i.e., just before
a station VMAC is configured to associated and before an AP
VMAC is started.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
drivers/net/wireless/iwlwifi/mvm/mac80211.c
drivers/net/wireless/iwlwifi/mvm/mvm.h