diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-06-02 03:03:33 -0400 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-06-24 14:55:40 -0400 |
commit | 75f6b9b64eeead2a7726f342b89a0c74c985e584 (patch) | |
tree | d5cc9aeb5c530e7ab5fd16d5358d5cdf8dfa93c7 /drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | |
parent | 1c87bbad439d818f94f2e8bff98f73d6fb568dfc (diff) |
iwlwivi: mvm: BT Coex - properly set the priority of beacons
Since the new API allows multiple priorities, we need to
properly set the beacon's prorities in the TX cmd associated
to it.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c index 3b0390b8639c..aad36212c4d7 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | |||
@@ -904,7 +904,7 @@ static int iwl_mvm_mac_ctxt_send_beacon(struct iwl_mvm *mvm, | |||
904 | struct iwl_mac_beacon_cmd beacon_cmd = {}; | 904 | struct iwl_mac_beacon_cmd beacon_cmd = {}; |
905 | struct ieee80211_tx_info *info; | 905 | struct ieee80211_tx_info *info; |
906 | u32 beacon_skb_len; | 906 | u32 beacon_skb_len; |
907 | u32 rate; | 907 | u32 rate, tx_flags; |
908 | 908 | ||
909 | if (WARN_ON(!beacon)) | 909 | if (WARN_ON(!beacon)) |
910 | return -EINVAL; | 910 | return -EINVAL; |
@@ -914,14 +914,17 @@ static int iwl_mvm_mac_ctxt_send_beacon(struct iwl_mvm *mvm, | |||
914 | /* TODO: for now the beacon template id is set to be the mac context id. | 914 | /* TODO: for now the beacon template id is set to be the mac context id. |
915 | * Might be better to handle it as another resource ... */ | 915 | * Might be better to handle it as another resource ... */ |
916 | beacon_cmd.template_id = cpu_to_le32((u32)mvmvif->id); | 916 | beacon_cmd.template_id = cpu_to_le32((u32)mvmvif->id); |
917 | info = IEEE80211_SKB_CB(beacon); | ||
917 | 918 | ||
918 | /* Set up TX command fields */ | 919 | /* Set up TX command fields */ |
919 | beacon_cmd.tx.len = cpu_to_le16((u16)beacon_skb_len); | 920 | beacon_cmd.tx.len = cpu_to_le16((u16)beacon_skb_len); |
920 | beacon_cmd.tx.sta_id = mvmvif->bcast_sta.sta_id; | 921 | beacon_cmd.tx.sta_id = mvmvif->bcast_sta.sta_id; |
921 | beacon_cmd.tx.life_time = cpu_to_le32(TX_CMD_LIFE_TIME_INFINITE); | 922 | beacon_cmd.tx.life_time = cpu_to_le32(TX_CMD_LIFE_TIME_INFINITE); |
922 | beacon_cmd.tx.tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL | | 923 | tx_flags = TX_CMD_FLG_SEQ_CTL | TX_CMD_FLG_TSF; |
923 | TX_CMD_FLG_BT_DIS | | 924 | tx_flags |= |
924 | TX_CMD_FLG_TSF); | 925 | iwl_mvm_bt_coex_tx_prio(mvm, (void *)beacon->data, info, 0) << |
926 | TX_CMD_FLG_BT_PRIO_POS; | ||
927 | beacon_cmd.tx.tx_flags = cpu_to_le32(tx_flags); | ||
925 | 928 | ||
926 | mvm->mgmt_last_antenna_idx = | 929 | mvm->mgmt_last_antenna_idx = |
927 | iwl_mvm_next_antenna(mvm, mvm->fw->valid_tx_ant, | 930 | iwl_mvm_next_antenna(mvm, mvm->fw->valid_tx_ant, |
@@ -931,8 +934,6 @@ static int iwl_mvm_mac_ctxt_send_beacon(struct iwl_mvm *mvm, | |||
931 | cpu_to_le32(BIT(mvm->mgmt_last_antenna_idx) << | 934 | cpu_to_le32(BIT(mvm->mgmt_last_antenna_idx) << |
932 | RATE_MCS_ANT_POS); | 935 | RATE_MCS_ANT_POS); |
933 | 936 | ||
934 | info = IEEE80211_SKB_CB(beacon); | ||
935 | |||
936 | if (info->band == IEEE80211_BAND_5GHZ || vif->p2p) { | 937 | if (info->band == IEEE80211_BAND_5GHZ || vif->p2p) { |
937 | rate = IWL_FIRST_OFDM_RATE; | 938 | rate = IWL_FIRST_OFDM_RATE; |
938 | } else { | 939 | } else { |