iwlwifi: mvm: set immediate apply time bit in time events
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 16 Feb 2014 13:36:00 +0000 (15:36 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 20 Feb 2014 17:19:33 +0000 (19:19 +0200)
Newer firmware support a new bit in the policy  that allows
to request to apply the time event immediately. Add this bit
without removing the workarounds we used until now to support
older firmares.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/fw-api.h
drivers/net/wireless/iwlwifi/mvm/time-event.c

index 4d808a91ea7fce06072d21f59712156550f6c3a3..807fa525cafe9a18c1cf658b5d4256219ce2e6cc 100644 (file)
@@ -712,6 +712,7 @@ enum {
        TE_V2_NOTIF_HOST_FRAG_END = BIT(5),
        TE_V2_NOTIF_INTERNAL_FRAG_START = BIT(6),
        TE_V2_NOTIF_INTERNAL_FRAG_END = BIT(7),
+       T2_V2_START_IMMEDIATELY = BIT(11),
 
        TE_V2_NOTIF_MSK = 0xff,
 
index e145dd41e85ec7d7e95ecf05257aac7a4dee8875..61331245ad9324f29ec5a86f12a3239725619673 100644 (file)
@@ -438,7 +438,8 @@ void iwl_mvm_protect_session(struct iwl_mvm *mvm,
        time_cmd.duration = cpu_to_le32(duration);
        time_cmd.repeat = 1;
        time_cmd.policy = cpu_to_le16(TE_V2_NOTIF_HOST_EVENT_START |
-                                     TE_V2_NOTIF_HOST_EVENT_END);
+                                     TE_V2_NOTIF_HOST_EVENT_END |
+                                     T2_V2_START_IMMEDIATELY);
 
        iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd);
 }
@@ -553,7 +554,8 @@ int iwl_mvm_start_p2p_roc(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
        time_cmd.duration = cpu_to_le32(MSEC_TO_TU(duration));
        time_cmd.repeat = 1;
        time_cmd.policy = cpu_to_le16(TE_V2_NOTIF_HOST_EVENT_START |
-                                     TE_V2_NOTIF_HOST_EVENT_END);
+                                     TE_V2_NOTIF_HOST_EVENT_END |
+                                     T2_V2_START_IMMEDIATELY);
 
        return iwl_mvm_time_event_send_add(mvm, vif, te_data, &time_cmd);
 }