aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2013-02-04 07:09:37 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-02-11 05:54:23 -0500
commit456f6ddf9cfd876a60df259dbe4f3cb943e773b4 (patch)
treee8e50afcdb22f875e00703ecb80969c85bc7db37
parent35adfd6e458741d3d3fca1ce0e342919eb250c2b (diff)
iwlwifi: mvm: Change the Time Event type used for ROC
The TE_P2P_DEVICE_DISCOVERABLE time event type used for ROC is assigned low priority in the FW, and thus has low chance of being scheduled when there are active BSS or GO VMACs (even if fragmentation is allowed). This is mainly problematic in for cases where ROC is requested for sending action frames. To overcome this, use a time event type that has priority equal to that ot the time event type used by the FW to action scan. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/time-event.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/time-event.c b/drivers/net/wireless/iwlwifi/mvm/time-event.c
index b9f076f4f17c..4d62a5d4254d 100644
--- a/drivers/net/wireless/iwlwifi/mvm/time-event.c
+++ b/drivers/net/wireless/iwlwifi/mvm/time-event.c
@@ -76,6 +76,15 @@
76#define TU_TO_JIFFIES(_tu) (usecs_to_jiffies((_tu) * 1024)) 76#define TU_TO_JIFFIES(_tu) (usecs_to_jiffies((_tu) * 1024))
77#define MSEC_TO_TU(_msec) (_msec*1000/1024) 77#define MSEC_TO_TU(_msec) (_msec*1000/1024)
78 78
79/* For ROC use a TE type which has priority high enough to be scheduled when
80 * there is a concurrent BSS or GO/AP. Currently, use a TE type that has
81 * priority similar to the TE priority used for action scans by the FW.
82 * TODO: This needs to be changed, based on the reason for the ROC, i.e., use
83 * TE_P2P_DEVICE_DISCOVERABLE for remain on channel without mgmt skb, and use
84 * TE_P2P_DEVICE_ACTION_SCAN
85 */
86#define IWL_MVM_ROC_TE_TYPE TE_P2P_DEVICE_ACTION_SCAN
87
79void iwl_mvm_te_clear_data(struct iwl_mvm *mvm, 88void iwl_mvm_te_clear_data(struct iwl_mvm *mvm,
80 struct iwl_mvm_time_event_data *te_data) 89 struct iwl_mvm_time_event_data *te_data)
81{ 90{
@@ -436,7 +445,7 @@ static bool iwl_mvm_roc_te_notif(struct iwl_notif_wait_data *notif_wait,
436 u32 mac_id_n_color = FW_CMD_ID_AND_COLOR(mvmvif->id, mvmvif->color); 445 u32 mac_id_n_color = FW_CMD_ID_AND_COLOR(mvmvif->id, mvmvif->color);
437 446
438 /* until we do something else */ 447 /* until we do something else */
439 WARN_ON(te_data->id != TE_P2P_DEVICE_DISCOVERABLE); 448 WARN_ON(te_data->id != IWL_MVM_ROC_TE_TYPE);
440 449
441 switch (pkt->hdr.cmd) { 450 switch (pkt->hdr.cmd) {
442 case TIME_EVENT_CMD: 451 case TIME_EVENT_CMD:
@@ -483,7 +492,7 @@ int iwl_mvm_start_p2p_roc(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
483 time_cmd.action = cpu_to_le32(FW_CTXT_ACTION_ADD); 492 time_cmd.action = cpu_to_le32(FW_CTXT_ACTION_ADD);
484 time_cmd.id_and_color = 493 time_cmd.id_and_color =
485 cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id, mvmvif->color)); 494 cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id, mvmvif->color));
486 time_cmd.id = cpu_to_le32(TE_P2P_DEVICE_DISCOVERABLE); 495 time_cmd.id = cpu_to_le32(IWL_MVM_ROC_TE_TYPE);
487 496
488 time_cmd.apply_time = cpu_to_le32(0); 497 time_cmd.apply_time = cpu_to_le32(0);
489 time_cmd.dep_policy = cpu_to_le32(TE_INDEPENDENT); 498 time_cmd.dep_policy = cpu_to_le32(TE_INDEPENDENT);
@@ -492,7 +501,7 @@ int iwl_mvm_start_p2p_roc(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
492 time_cmd.interval = cpu_to_le32(1); 501 time_cmd.interval = cpu_to_le32(1);
493 502
494 /* 503 /*
495 * TE_P2P_DEVICE_DISCOVERABLE can have lower priority than other events 504 * IWL_MVM_ROC_TE_TYPE can have lower priority than other events
496 * that are being scheduled by the driver/fw, and thus it might not be 505 * that are being scheduled by the driver/fw, and thus it might not be
497 * scheduled. To improve the chances of it being scheduled, allow it to 506 * scheduled. To improve the chances of it being scheduled, allow it to
498 * be fragmented. 507 * be fragmented.