diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2009-01-27 17:27:56 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-09 15:03:34 -0500 |
commit | e1623446bb1de1834ff1c57b3e8ed341d5d4a927 (patch) | |
tree | ece3595deda6d6bad747961be257d5f2cbb507b1 /drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |
parent | 450154e4f471248e188d18e45c2409b37a133765 (diff) |
iwlwifi: don't use implicit priv in IWL_DEBUG
Call IWL_DEBUG macro with explicit priv argument.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-rs.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 13039a024473..04b42c8a7705 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -360,7 +360,7 @@ static void rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv, | |||
360 | struct ieee80211_sta *sta) | 360 | struct ieee80211_sta *sta) |
361 | { | 361 | { |
362 | if (rs_tl_get_load(lq_data, tid) > IWL_AGG_LOAD_THRESHOLD) { | 362 | if (rs_tl_get_load(lq_data, tid) > IWL_AGG_LOAD_THRESHOLD) { |
363 | IWL_DEBUG_HT("Starting Tx agg: STA: %pM tid: %d\n", | 363 | IWL_DEBUG_HT(priv, "Starting Tx agg: STA: %pM tid: %d\n", |
364 | sta->addr, tid); | 364 | sta->addr, tid); |
365 | ieee80211_start_tx_ba_session(priv->hw, sta->addr, tid); | 365 | ieee80211_start_tx_ba_session(priv->hw, sta->addr, tid); |
366 | } | 366 | } |
@@ -693,7 +693,7 @@ static u16 rs_get_adjacent_rate(struct iwl_priv *priv, u8 index, u16 rate_mask, | |||
693 | break; | 693 | break; |
694 | if (rate_mask & (1 << low)) | 694 | if (rate_mask & (1 << low)) |
695 | break; | 695 | break; |
696 | IWL_DEBUG_RATE("Skipping masked lower rate: %d\n", low); | 696 | IWL_DEBUG_RATE(priv, "Skipping masked lower rate: %d\n", low); |
697 | } | 697 | } |
698 | 698 | ||
699 | high = index; | 699 | high = index; |
@@ -703,7 +703,7 @@ static u16 rs_get_adjacent_rate(struct iwl_priv *priv, u8 index, u16 rate_mask, | |||
703 | break; | 703 | break; |
704 | if (rate_mask & (1 << high)) | 704 | if (rate_mask & (1 << high)) |
705 | break; | 705 | break; |
706 | IWL_DEBUG_RATE("Skipping masked higher rate: %d\n", high); | 706 | IWL_DEBUG_RATE(priv, "Skipping masked higher rate: %d\n", high); |
707 | } | 707 | } |
708 | 708 | ||
709 | return (high << 8) | low; | 709 | return (high << 8) | low; |
@@ -790,7 +790,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband, | |||
790 | u8 active_index = 0; | 790 | u8 active_index = 0; |
791 | s32 tpt = 0; | 791 | s32 tpt = 0; |
792 | 792 | ||
793 | IWL_DEBUG_RATE_LIMIT("get frame ack response, update rate scale window\n"); | 793 | IWL_DEBUG_RATE_LIMIT(priv, "get frame ack response, update rate scale window\n"); |
794 | 794 | ||
795 | if (!ieee80211_is_data(hdr->frame_control) || | 795 | if (!ieee80211_is_data(hdr->frame_control) || |
796 | is_multicast_ether_addr(hdr->addr1)) | 796 | is_multicast_ether_addr(hdr->addr1)) |
@@ -840,7 +840,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband, | |||
840 | (!!(tx_rate & RATE_MCS_GF_MSK) != !!(info->status.rates[0].flags & IEEE80211_TX_RC_GREEN_FIELD)) || | 840 | (!!(tx_rate & RATE_MCS_GF_MSK) != !!(info->status.rates[0].flags & IEEE80211_TX_RC_GREEN_FIELD)) || |
841 | (hw->wiphy->bands[priv->band]->bitrates[rs_index].bitrate != | 841 | (hw->wiphy->bands[priv->band]->bitrates[rs_index].bitrate != |
842 | hw->wiphy->bands[info->band]->bitrates[info->status.rates[0].idx].bitrate)) { | 842 | hw->wiphy->bands[info->band]->bitrates[info->status.rates[0].idx].bitrate)) { |
843 | IWL_DEBUG_RATE("initial rate does not match 0x%x\n", tx_rate); | 843 | IWL_DEBUG_RATE(priv, "initial rate does not match 0x%x\n", tx_rate); |
844 | /* the last LQ command could failed so the LQ in ucode not | 844 | /* the last LQ command could failed so the LQ in ucode not |
845 | * the same in driver sync up | 845 | * the same in driver sync up |
846 | */ | 846 | */ |
@@ -971,7 +971,7 @@ out: | |||
971 | static void rs_set_stay_in_table(struct iwl_priv *priv, u8 is_legacy, | 971 | static void rs_set_stay_in_table(struct iwl_priv *priv, u8 is_legacy, |
972 | struct iwl_lq_sta *lq_sta) | 972 | struct iwl_lq_sta *lq_sta) |
973 | { | 973 | { |
974 | IWL_DEBUG_RATE("we are staying in the same table\n"); | 974 | IWL_DEBUG_RATE(priv, "we are staying in the same table\n"); |
975 | lq_sta->stay_in_tbl = 1; /* only place this gets set */ | 975 | lq_sta->stay_in_tbl = 1; /* only place this gets set */ |
976 | if (is_legacy) { | 976 | if (is_legacy) { |
977 | lq_sta->table_count_limit = IWL_LEGACY_TABLE_COUNT; | 977 | lq_sta->table_count_limit = IWL_LEGACY_TABLE_COUNT; |
@@ -1150,7 +1150,7 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv, | |||
1150 | if (priv->hw_params.tx_chains_num < 2) | 1150 | if (priv->hw_params.tx_chains_num < 2) |
1151 | return -1; | 1151 | return -1; |
1152 | 1152 | ||
1153 | IWL_DEBUG_RATE("LQ: try to switch to MIMO2\n"); | 1153 | IWL_DEBUG_RATE(priv, "LQ: try to switch to MIMO2\n"); |
1154 | 1154 | ||
1155 | tbl->lq_type = LQ_MIMO2; | 1155 | tbl->lq_type = LQ_MIMO2; |
1156 | tbl->is_dup = lq_sta->is_dup; | 1156 | tbl->is_dup = lq_sta->is_dup; |
@@ -1179,16 +1179,16 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv, | |||
1179 | 1179 | ||
1180 | rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index); | 1180 | rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index); |
1181 | 1181 | ||
1182 | IWL_DEBUG_RATE("LQ: MIMO2 best rate %d mask %X\n", rate, rate_mask); | 1182 | IWL_DEBUG_RATE(priv, "LQ: MIMO2 best rate %d mask %X\n", rate, rate_mask); |
1183 | 1183 | ||
1184 | if ((rate == IWL_RATE_INVALID) || !((1 << rate) & rate_mask)) { | 1184 | if ((rate == IWL_RATE_INVALID) || !((1 << rate) & rate_mask)) { |
1185 | IWL_DEBUG_RATE("Can't switch with index %d rate mask %x\n", | 1185 | IWL_DEBUG_RATE(priv, "Can't switch with index %d rate mask %x\n", |
1186 | rate, rate_mask); | 1186 | rate, rate_mask); |
1187 | return -1; | 1187 | return -1; |
1188 | } | 1188 | } |
1189 | tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green); | 1189 | tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green); |
1190 | 1190 | ||
1191 | IWL_DEBUG_RATE("LQ: Switch to new mcs %X index is green %X\n", | 1191 | IWL_DEBUG_RATE(priv, "LQ: Switch to new mcs %X index is green %X\n", |
1192 | tbl->current_rate, is_green); | 1192 | tbl->current_rate, is_green); |
1193 | return 0; | 1193 | return 0; |
1194 | } | 1194 | } |
@@ -1209,7 +1209,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv, | |||
1209 | if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported) | 1209 | if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported) |
1210 | return -1; | 1210 | return -1; |
1211 | 1211 | ||
1212 | IWL_DEBUG_RATE("LQ: try to switch to SISO\n"); | 1212 | IWL_DEBUG_RATE(priv, "LQ: try to switch to SISO\n"); |
1213 | 1213 | ||
1214 | tbl->is_dup = lq_sta->is_dup; | 1214 | tbl->is_dup = lq_sta->is_dup; |
1215 | tbl->lq_type = LQ_SISO; | 1215 | tbl->lq_type = LQ_SISO; |
@@ -1240,14 +1240,14 @@ static int rs_switch_to_siso(struct iwl_priv *priv, | |||
1240 | rs_set_expected_tpt_table(lq_sta, tbl); | 1240 | rs_set_expected_tpt_table(lq_sta, tbl); |
1241 | rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index); | 1241 | rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index); |
1242 | 1242 | ||
1243 | IWL_DEBUG_RATE("LQ: get best rate %d mask %X\n", rate, rate_mask); | 1243 | IWL_DEBUG_RATE(priv, "LQ: get best rate %d mask %X\n", rate, rate_mask); |
1244 | if ((rate == IWL_RATE_INVALID) || !((1 << rate) & rate_mask)) { | 1244 | if ((rate == IWL_RATE_INVALID) || !((1 << rate) & rate_mask)) { |
1245 | IWL_DEBUG_RATE("can not switch with index %d rate mask %x\n", | 1245 | IWL_DEBUG_RATE(priv, "can not switch with index %d rate mask %x\n", |
1246 | rate, rate_mask); | 1246 | rate, rate_mask); |
1247 | return -1; | 1247 | return -1; |
1248 | } | 1248 | } |
1249 | tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green); | 1249 | tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green); |
1250 | IWL_DEBUG_RATE("LQ: Switch to new mcs %X index is green %X\n", | 1250 | IWL_DEBUG_RATE(priv, "LQ: Switch to new mcs %X index is green %X\n", |
1251 | tbl->current_rate, is_green); | 1251 | tbl->current_rate, is_green); |
1252 | return 0; | 1252 | return 0; |
1253 | } | 1253 | } |
@@ -1276,7 +1276,7 @@ static int rs_move_legacy_other(struct iwl_priv *priv, | |||
1276 | switch (tbl->action) { | 1276 | switch (tbl->action) { |
1277 | case IWL_LEGACY_SWITCH_ANTENNA1: | 1277 | case IWL_LEGACY_SWITCH_ANTENNA1: |
1278 | case IWL_LEGACY_SWITCH_ANTENNA2: | 1278 | case IWL_LEGACY_SWITCH_ANTENNA2: |
1279 | IWL_DEBUG_RATE("LQ: Legacy toggle Antenna\n"); | 1279 | IWL_DEBUG_RATE(priv, "LQ: Legacy toggle Antenna\n"); |
1280 | 1280 | ||
1281 | lq_sta->action_counter++; | 1281 | lq_sta->action_counter++; |
1282 | 1282 | ||
@@ -1300,7 +1300,7 @@ static int rs_move_legacy_other(struct iwl_priv *priv, | |||
1300 | } | 1300 | } |
1301 | break; | 1301 | break; |
1302 | case IWL_LEGACY_SWITCH_SISO: | 1302 | case IWL_LEGACY_SWITCH_SISO: |
1303 | IWL_DEBUG_RATE("LQ: Legacy switch to SISO\n"); | 1303 | IWL_DEBUG_RATE(priv, "LQ: Legacy switch to SISO\n"); |
1304 | 1304 | ||
1305 | /* Set up search table to try SISO */ | 1305 | /* Set up search table to try SISO */ |
1306 | memcpy(search_tbl, tbl, sz); | 1306 | memcpy(search_tbl, tbl, sz); |
@@ -1316,7 +1316,7 @@ static int rs_move_legacy_other(struct iwl_priv *priv, | |||
1316 | case IWL_LEGACY_SWITCH_MIMO2_AB: | 1316 | case IWL_LEGACY_SWITCH_MIMO2_AB: |
1317 | case IWL_LEGACY_SWITCH_MIMO2_AC: | 1317 | case IWL_LEGACY_SWITCH_MIMO2_AC: |
1318 | case IWL_LEGACY_SWITCH_MIMO2_BC: | 1318 | case IWL_LEGACY_SWITCH_MIMO2_BC: |
1319 | IWL_DEBUG_RATE("LQ: Legacy switch to MIMO2\n"); | 1319 | IWL_DEBUG_RATE(priv, "LQ: Legacy switch to MIMO2\n"); |
1320 | 1320 | ||
1321 | /* Set up search table to try MIMO */ | 1321 | /* Set up search table to try MIMO */ |
1322 | memcpy(search_tbl, tbl, sz); | 1322 | memcpy(search_tbl, tbl, sz); |
@@ -1385,7 +1385,7 @@ static int rs_move_siso_to_other(struct iwl_priv *priv, | |||
1385 | switch (tbl->action) { | 1385 | switch (tbl->action) { |
1386 | case IWL_SISO_SWITCH_ANTENNA1: | 1386 | case IWL_SISO_SWITCH_ANTENNA1: |
1387 | case IWL_SISO_SWITCH_ANTENNA2: | 1387 | case IWL_SISO_SWITCH_ANTENNA2: |
1388 | IWL_DEBUG_RATE("LQ: SISO toggle Antenna\n"); | 1388 | IWL_DEBUG_RATE(priv, "LQ: SISO toggle Antenna\n"); |
1389 | 1389 | ||
1390 | if ((tbl->action == IWL_SISO_SWITCH_ANTENNA1 && | 1390 | if ((tbl->action == IWL_SISO_SWITCH_ANTENNA1 && |
1391 | tx_chains_num <= 1) || | 1391 | tx_chains_num <= 1) || |
@@ -1404,7 +1404,7 @@ static int rs_move_siso_to_other(struct iwl_priv *priv, | |||
1404 | case IWL_SISO_SWITCH_MIMO2_AB: | 1404 | case IWL_SISO_SWITCH_MIMO2_AB: |
1405 | case IWL_SISO_SWITCH_MIMO2_AC: | 1405 | case IWL_SISO_SWITCH_MIMO2_AC: |
1406 | case IWL_SISO_SWITCH_MIMO2_BC: | 1406 | case IWL_SISO_SWITCH_MIMO2_BC: |
1407 | IWL_DEBUG_RATE("LQ: SISO switch to MIMO2\n"); | 1407 | IWL_DEBUG_RATE(priv, "LQ: SISO switch to MIMO2\n"); |
1408 | memcpy(search_tbl, tbl, sz); | 1408 | memcpy(search_tbl, tbl, sz); |
1409 | search_tbl->is_SGI = 0; | 1409 | search_tbl->is_SGI = 0; |
1410 | 1410 | ||
@@ -1433,7 +1433,7 @@ static int rs_move_siso_to_other(struct iwl_priv *priv, | |||
1433 | HT_SHORT_GI_40MHZ)) | 1433 | HT_SHORT_GI_40MHZ)) |
1434 | break; | 1434 | break; |
1435 | 1435 | ||
1436 | IWL_DEBUG_RATE("LQ: SISO toggle SGI/NGI\n"); | 1436 | IWL_DEBUG_RATE(priv, "LQ: SISO toggle SGI/NGI\n"); |
1437 | 1437 | ||
1438 | memcpy(search_tbl, tbl, sz); | 1438 | memcpy(search_tbl, tbl, sz); |
1439 | if (is_green) { | 1439 | if (is_green) { |
@@ -1498,7 +1498,7 @@ static int rs_move_mimo_to_other(struct iwl_priv *priv, | |||
1498 | switch (tbl->action) { | 1498 | switch (tbl->action) { |
1499 | case IWL_MIMO2_SWITCH_ANTENNA1: | 1499 | case IWL_MIMO2_SWITCH_ANTENNA1: |
1500 | case IWL_MIMO2_SWITCH_ANTENNA2: | 1500 | case IWL_MIMO2_SWITCH_ANTENNA2: |
1501 | IWL_DEBUG_RATE("LQ: MIMO toggle Antennas\n"); | 1501 | IWL_DEBUG_RATE(priv, "LQ: MIMO toggle Antennas\n"); |
1502 | 1502 | ||
1503 | if (tx_chains_num <= 2) | 1503 | if (tx_chains_num <= 2) |
1504 | break; | 1504 | break; |
@@ -1514,7 +1514,7 @@ static int rs_move_mimo_to_other(struct iwl_priv *priv, | |||
1514 | case IWL_MIMO2_SWITCH_SISO_A: | 1514 | case IWL_MIMO2_SWITCH_SISO_A: |
1515 | case IWL_MIMO2_SWITCH_SISO_B: | 1515 | case IWL_MIMO2_SWITCH_SISO_B: |
1516 | case IWL_MIMO2_SWITCH_SISO_C: | 1516 | case IWL_MIMO2_SWITCH_SISO_C: |
1517 | IWL_DEBUG_RATE("LQ: MIMO2 switch to SISO\n"); | 1517 | IWL_DEBUG_RATE(priv, "LQ: MIMO2 switch to SISO\n"); |
1518 | 1518 | ||
1519 | /* Set up new search table for SISO */ | 1519 | /* Set up new search table for SISO */ |
1520 | memcpy(search_tbl, tbl, sz); | 1520 | memcpy(search_tbl, tbl, sz); |
@@ -1546,7 +1546,7 @@ static int rs_move_mimo_to_other(struct iwl_priv *priv, | |||
1546 | HT_SHORT_GI_40MHZ)) | 1546 | HT_SHORT_GI_40MHZ)) |
1547 | break; | 1547 | break; |
1548 | 1548 | ||
1549 | IWL_DEBUG_RATE("LQ: MIMO toggle SGI/NGI\n"); | 1549 | IWL_DEBUG_RATE(priv, "LQ: MIMO toggle SGI/NGI\n"); |
1550 | 1550 | ||
1551 | /* Set up new search table for MIMO */ | 1551 | /* Set up new search table for MIMO */ |
1552 | memcpy(search_tbl, tbl, sz); | 1552 | memcpy(search_tbl, tbl, sz); |
@@ -1629,7 +1629,7 @@ static void rs_stay_in_table(struct iwl_lq_sta *lq_sta) | |||
1629 | (lq_sta->total_success > lq_sta->max_success_limit) || | 1629 | (lq_sta->total_success > lq_sta->max_success_limit) || |
1630 | ((!lq_sta->search_better_tbl) && (lq_sta->flush_timer) | 1630 | ((!lq_sta->search_better_tbl) && (lq_sta->flush_timer) |
1631 | && (flush_interval_passed))) { | 1631 | && (flush_interval_passed))) { |
1632 | IWL_DEBUG_RATE("LQ: stay is expired %d %d %d\n:", | 1632 | IWL_DEBUG_RATE(priv, "LQ: stay is expired %d %d %d\n:", |
1633 | lq_sta->total_failed, | 1633 | lq_sta->total_failed, |
1634 | lq_sta->total_success, | 1634 | lq_sta->total_success, |
1635 | flush_interval_passed); | 1635 | flush_interval_passed); |
@@ -1652,7 +1652,7 @@ static void rs_stay_in_table(struct iwl_lq_sta *lq_sta) | |||
1652 | lq_sta->table_count_limit) { | 1652 | lq_sta->table_count_limit) { |
1653 | lq_sta->table_count = 0; | 1653 | lq_sta->table_count = 0; |
1654 | 1654 | ||
1655 | IWL_DEBUG_RATE("LQ: stay in table clear win\n"); | 1655 | IWL_DEBUG_RATE(priv, "LQ: stay in table clear win\n"); |
1656 | for (i = 0; i < IWL_RATE_COUNT; i++) | 1656 | for (i = 0; i < IWL_RATE_COUNT; i++) |
1657 | rs_rate_scale_clear_window( | 1657 | rs_rate_scale_clear_window( |
1658 | &(tbl->win[i])); | 1658 | &(tbl->win[i])); |
@@ -1701,7 +1701,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
1701 | s32 sr; | 1701 | s32 sr; |
1702 | u8 tid = MAX_TID_COUNT; | 1702 | u8 tid = MAX_TID_COUNT; |
1703 | 1703 | ||
1704 | IWL_DEBUG_RATE("rate scale calculate new rate for skb\n"); | 1704 | IWL_DEBUG_RATE(priv, "rate scale calculate new rate for skb\n"); |
1705 | 1705 | ||
1706 | /* Send management frames and broadcast/multicast data using | 1706 | /* Send management frames and broadcast/multicast data using |
1707 | * lowest rate. */ | 1707 | * lowest rate. */ |
@@ -1733,13 +1733,13 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
1733 | /* current tx rate */ | 1733 | /* current tx rate */ |
1734 | index = lq_sta->last_txrate_idx; | 1734 | index = lq_sta->last_txrate_idx; |
1735 | 1735 | ||
1736 | IWL_DEBUG_RATE("Rate scale index %d for type %d\n", index, | 1736 | IWL_DEBUG_RATE(priv, "Rate scale index %d for type %d\n", index, |
1737 | tbl->lq_type); | 1737 | tbl->lq_type); |
1738 | 1738 | ||
1739 | /* rates available for this association, and for modulation mode */ | 1739 | /* rates available for this association, and for modulation mode */ |
1740 | rate_mask = rs_get_supported_rates(lq_sta, hdr, tbl->lq_type); | 1740 | rate_mask = rs_get_supported_rates(lq_sta, hdr, tbl->lq_type); |
1741 | 1741 | ||
1742 | IWL_DEBUG_RATE("mask 0x%04X \n", rate_mask); | 1742 | IWL_DEBUG_RATE(priv, "mask 0x%04X \n", rate_mask); |
1743 | 1743 | ||
1744 | /* mask with station rate restriction */ | 1744 | /* mask with station rate restriction */ |
1745 | if (is_legacy(tbl->lq_type)) { | 1745 | if (is_legacy(tbl->lq_type)) { |
@@ -1789,7 +1789,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
1789 | fail_count = window->counter - window->success_counter; | 1789 | fail_count = window->counter - window->success_counter; |
1790 | if ((fail_count < IWL_RATE_MIN_FAILURE_TH) && | 1790 | if ((fail_count < IWL_RATE_MIN_FAILURE_TH) && |
1791 | (window->success_counter < IWL_RATE_MIN_SUCCESS_TH)) { | 1791 | (window->success_counter < IWL_RATE_MIN_SUCCESS_TH)) { |
1792 | IWL_DEBUG_RATE("LQ: still below TH. succ=%d total=%d " | 1792 | IWL_DEBUG_RATE(priv, "LQ: still below TH. succ=%d total=%d " |
1793 | "for index %d\n", | 1793 | "for index %d\n", |
1794 | window->success_counter, window->counter, index); | 1794 | window->success_counter, window->counter, index); |
1795 | 1795 | ||
@@ -1817,7 +1817,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
1817 | * continuing to use the setup that we've been trying. */ | 1817 | * continuing to use the setup that we've been trying. */ |
1818 | if (window->average_tpt > lq_sta->last_tpt) { | 1818 | if (window->average_tpt > lq_sta->last_tpt) { |
1819 | 1819 | ||
1820 | IWL_DEBUG_RATE("LQ: SWITCHING TO NEW TABLE " | 1820 | IWL_DEBUG_RATE(priv, "LQ: SWITCHING TO NEW TABLE " |
1821 | "suc=%d cur-tpt=%d old-tpt=%d\n", | 1821 | "suc=%d cur-tpt=%d old-tpt=%d\n", |
1822 | window->success_ratio, | 1822 | window->success_ratio, |
1823 | window->average_tpt, | 1823 | window->average_tpt, |
@@ -1833,7 +1833,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
1833 | /* Else poor success; go back to mode in "active" table */ | 1833 | /* Else poor success; go back to mode in "active" table */ |
1834 | } else { | 1834 | } else { |
1835 | 1835 | ||
1836 | IWL_DEBUG_RATE("LQ: GOING BACK TO THE OLD TABLE " | 1836 | IWL_DEBUG_RATE(priv, "LQ: GOING BACK TO THE OLD TABLE " |
1837 | "suc=%d cur-tpt=%d old-tpt=%d\n", | 1837 | "suc=%d cur-tpt=%d old-tpt=%d\n", |
1838 | window->success_ratio, | 1838 | window->success_ratio, |
1839 | window->average_tpt, | 1839 | window->average_tpt, |
@@ -1886,7 +1886,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
1886 | 1886 | ||
1887 | /* Too many failures, decrease rate */ | 1887 | /* Too many failures, decrease rate */ |
1888 | if ((sr <= IWL_RATE_DECREASE_TH) || (current_tpt == 0)) { | 1888 | if ((sr <= IWL_RATE_DECREASE_TH) || (current_tpt == 0)) { |
1889 | IWL_DEBUG_RATE("decrease rate because of low success_ratio\n"); | 1889 | IWL_DEBUG_RATE(priv, "decrease rate because of low success_ratio\n"); |
1890 | scale_action = -1; | 1890 | scale_action = -1; |
1891 | 1891 | ||
1892 | /* No throughput measured yet for adjacent rates; try increase. */ | 1892 | /* No throughput measured yet for adjacent rates; try increase. */ |
@@ -1917,8 +1917,8 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
1917 | sr >= IWL_RATE_INCREASE_TH) { | 1917 | sr >= IWL_RATE_INCREASE_TH) { |
1918 | scale_action = 1; | 1918 | scale_action = 1; |
1919 | } else { | 1919 | } else { |
1920 | IWL_DEBUG_RATE | 1920 | IWL_DEBUG_RATE(priv, |
1921 | ("decrease rate because of high tpt\n"); | 1921 | "decrease rate because of high tpt\n"); |
1922 | scale_action = -1; | 1922 | scale_action = -1; |
1923 | } | 1923 | } |
1924 | 1924 | ||
@@ -1926,8 +1926,8 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
1926 | } else if (low_tpt != IWL_INVALID_VALUE) { | 1926 | } else if (low_tpt != IWL_INVALID_VALUE) { |
1927 | /* Lower rate has better throughput */ | 1927 | /* Lower rate has better throughput */ |
1928 | if (low_tpt > current_tpt) { | 1928 | if (low_tpt > current_tpt) { |
1929 | IWL_DEBUG_RATE | 1929 | IWL_DEBUG_RATE(priv, |
1930 | ("decrease rate because of low tpt\n"); | 1930 | "decrease rate because of low tpt\n"); |
1931 | scale_action = -1; | 1931 | scale_action = -1; |
1932 | } else if (sr >= IWL_RATE_INCREASE_TH) { | 1932 | } else if (sr >= IWL_RATE_INCREASE_TH) { |
1933 | scale_action = 1; | 1933 | scale_action = 1; |
@@ -1964,7 +1964,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
1964 | break; | 1964 | break; |
1965 | } | 1965 | } |
1966 | 1966 | ||
1967 | IWL_DEBUG_RATE("choose rate scale index %d action %d low %d " | 1967 | IWL_DEBUG_RATE(priv, "choose rate scale index %d action %d low %d " |
1968 | "high %d type %d\n", | 1968 | "high %d type %d\n", |
1969 | index, scale_action, low, high, tbl->lq_type); | 1969 | index, scale_action, low, high, tbl->lq_type); |
1970 | 1970 | ||
@@ -2008,7 +2008,7 @@ lq_update: | |||
2008 | /* Use new "search" start rate */ | 2008 | /* Use new "search" start rate */ |
2009 | index = iwl_hwrate_to_plcp_idx(tbl->current_rate); | 2009 | index = iwl_hwrate_to_plcp_idx(tbl->current_rate); |
2010 | 2010 | ||
2011 | IWL_DEBUG_RATE("Switch current mcs: %X index: %d\n", | 2011 | IWL_DEBUG_RATE(priv, "Switch current mcs: %X index: %d\n", |
2012 | tbl->current_rate, index); | 2012 | tbl->current_rate, index); |
2013 | rs_fill_link_cmd(priv, lq_sta, tbl->current_rate); | 2013 | rs_fill_link_cmd(priv, lq_sta, tbl->current_rate); |
2014 | iwl_send_lq_cmd(priv, &lq_sta->lq, CMD_ASYNC); | 2014 | iwl_send_lq_cmd(priv, &lq_sta->lq, CMD_ASYNC); |
@@ -2023,7 +2023,7 @@ lq_update: | |||
2023 | if (is_legacy(tbl1->lq_type) && !conf_is_ht(conf) && | 2023 | if (is_legacy(tbl1->lq_type) && !conf_is_ht(conf) && |
2024 | lq_sta->action_counter >= 1) { | 2024 | lq_sta->action_counter >= 1) { |
2025 | lq_sta->action_counter = 0; | 2025 | lq_sta->action_counter = 0; |
2026 | IWL_DEBUG_RATE("LQ: STAY in legacy table\n"); | 2026 | IWL_DEBUG_RATE(priv, "LQ: STAY in legacy table\n"); |
2027 | rs_set_stay_in_table(priv, 1, lq_sta); | 2027 | rs_set_stay_in_table(priv, 1, lq_sta); |
2028 | } | 2028 | } |
2029 | 2029 | ||
@@ -2035,7 +2035,7 @@ lq_update: | |||
2035 | if ((lq_sta->last_tpt > IWL_AGG_TPT_THREHOLD) && | 2035 | if ((lq_sta->last_tpt > IWL_AGG_TPT_THREHOLD) && |
2036 | (lq_sta->tx_agg_tid_en & (1 << tid)) && | 2036 | (lq_sta->tx_agg_tid_en & (1 << tid)) && |
2037 | (tid != MAX_TID_COUNT)) { | 2037 | (tid != MAX_TID_COUNT)) { |
2038 | IWL_DEBUG_RATE("try to aggregate tid %d\n", tid); | 2038 | IWL_DEBUG_RATE(priv, "try to aggregate tid %d\n", tid); |
2039 | rs_tl_turn_on_agg(priv, tid, lq_sta, sta); | 2039 | rs_tl_turn_on_agg(priv, tid, lq_sta, sta); |
2040 | } | 2040 | } |
2041 | lq_sta->action_counter = 0; | 2041 | lq_sta->action_counter = 0; |
@@ -2131,7 +2131,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta, | |||
2131 | int rate_idx; | 2131 | int rate_idx; |
2132 | u64 mask_bit = 0; | 2132 | u64 mask_bit = 0; |
2133 | 2133 | ||
2134 | IWL_DEBUG_RATE_LIMIT("rate scale calculate new rate for skb\n"); | 2134 | IWL_DEBUG_RATE_LIMIT(priv, "rate scale calculate new rate for skb\n"); |
2135 | 2135 | ||
2136 | /* Get max rate if user set max rate */ | 2136 | /* Get max rate if user set max rate */ |
2137 | if (lq_sta) { | 2137 | if (lq_sta) { |
@@ -2167,7 +2167,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta, | |||
2167 | u8 sta_id = iwl_find_station(priv, hdr->addr1); | 2167 | u8 sta_id = iwl_find_station(priv, hdr->addr1); |
2168 | 2168 | ||
2169 | if (sta_id == IWL_INVALID_STATION) { | 2169 | if (sta_id == IWL_INVALID_STATION) { |
2170 | IWL_DEBUG_RATE("LQ: ADD station %pM\n", | 2170 | IWL_DEBUG_RATE(priv, "LQ: ADD station %pM\n", |
2171 | hdr->addr1); | 2171 | hdr->addr1); |
2172 | sta_id = iwl_add_station_flags(priv, hdr->addr1, | 2172 | sta_id = iwl_add_station_flags(priv, hdr->addr1, |
2173 | 0, CMD_ASYNC, NULL); | 2173 | 0, CMD_ASYNC, NULL); |
@@ -2196,7 +2196,7 @@ static void *rs_alloc_sta(void *priv_rate, struct ieee80211_sta *sta, | |||
2196 | int i, j; | 2196 | int i, j; |
2197 | 2197 | ||
2198 | priv = (struct iwl_priv *)priv_rate; | 2198 | priv = (struct iwl_priv *)priv_rate; |
2199 | IWL_DEBUG_RATE("create station rate scale window\n"); | 2199 | IWL_DEBUG_RATE(priv, "create station rate scale window\n"); |
2200 | 2200 | ||
2201 | lq_sta = kzalloc(sizeof(struct iwl_lq_sta), gfp); | 2201 | lq_sta = kzalloc(sizeof(struct iwl_lq_sta), gfp); |
2202 | 2202 | ||
@@ -2229,7 +2229,7 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband, | |||
2229 | for (i = 0; i < IWL_RATE_COUNT; i++) | 2229 | for (i = 0; i < IWL_RATE_COUNT; i++) |
2230 | rs_rate_scale_clear_window(&lq_sta->lq_info[j].win[i]); | 2230 | rs_rate_scale_clear_window(&lq_sta->lq_info[j].win[i]); |
2231 | 2231 | ||
2232 | IWL_DEBUG_RATE("LQ: *** rate scale station global init ***\n"); | 2232 | IWL_DEBUG_RATE(priv, "LQ: *** rate scale station global init ***\n"); |
2233 | /* TODO: what is a good starting rate for STA? About middle? Maybe not | 2233 | /* TODO: what is a good starting rate for STA? About middle? Maybe not |
2234 | * the lowest or the highest rate.. Could consider using RSSI from | 2234 | * the lowest or the highest rate.. Could consider using RSSI from |
2235 | * previous packets? Need to have IEEE 802.1X auth succeed immediately | 2235 | * previous packets? Need to have IEEE 802.1X auth succeed immediately |
@@ -2240,10 +2240,10 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband, | |||
2240 | u8 sta_id = iwl_find_station(priv, sta->addr); | 2240 | u8 sta_id = iwl_find_station(priv, sta->addr); |
2241 | 2241 | ||
2242 | /* for IBSS the call are from tasklet */ | 2242 | /* for IBSS the call are from tasklet */ |
2243 | IWL_DEBUG_RATE("LQ: ADD station %pM\n", sta->addr); | 2243 | IWL_DEBUG_RATE(priv, "LQ: ADD station %pM\n", sta->addr); |
2244 | 2244 | ||
2245 | if (sta_id == IWL_INVALID_STATION) { | 2245 | if (sta_id == IWL_INVALID_STATION) { |
2246 | IWL_DEBUG_RATE("LQ: ADD station %pM\n", sta->addr); | 2246 | IWL_DEBUG_RATE(priv, "LQ: ADD station %pM\n", sta->addr); |
2247 | sta_id = iwl_add_station_flags(priv, sta->addr, | 2247 | sta_id = iwl_add_station_flags(priv, sta->addr, |
2248 | 0, CMD_ASYNC, NULL); | 2248 | 0, CMD_ASYNC, NULL); |
2249 | } | 2249 | } |
@@ -2282,7 +2282,7 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband, | |||
2282 | lq_sta->active_mimo3_rate &= ~((u16)0x2); | 2282 | lq_sta->active_mimo3_rate &= ~((u16)0x2); |
2283 | lq_sta->active_mimo3_rate <<= IWL_FIRST_OFDM_RATE; | 2283 | lq_sta->active_mimo3_rate <<= IWL_FIRST_OFDM_RATE; |
2284 | 2284 | ||
2285 | IWL_DEBUG_RATE("SISO-RATE=%X MIMO2-RATE=%X MIMO3-RATE=%X\n", | 2285 | IWL_DEBUG_RATE(priv, "SISO-RATE=%X MIMO2-RATE=%X MIMO3-RATE=%X\n", |
2286 | lq_sta->active_siso_rate, | 2286 | lq_sta->active_siso_rate, |
2287 | lq_sta->active_mimo2_rate, | 2287 | lq_sta->active_mimo2_rate, |
2288 | lq_sta->active_mimo3_rate); | 2288 | lq_sta->active_mimo3_rate); |
@@ -2448,9 +2448,9 @@ static void rs_free_sta(void *priv_r, struct ieee80211_sta *sta, | |||
2448 | struct iwl_lq_sta *lq_sta = priv_sta; | 2448 | struct iwl_lq_sta *lq_sta = priv_sta; |
2449 | struct iwl_priv *priv __maybe_unused = priv_r; | 2449 | struct iwl_priv *priv __maybe_unused = priv_r; |
2450 | 2450 | ||
2451 | IWL_DEBUG_RATE("enter\n"); | 2451 | IWL_DEBUG_RATE(priv, "enter\n"); |
2452 | kfree(lq_sta); | 2452 | kfree(lq_sta); |
2453 | IWL_DEBUG_RATE("leave\n"); | 2453 | IWL_DEBUG_RATE(priv, "leave\n"); |
2454 | } | 2454 | } |
2455 | 2455 | ||
2456 | 2456 | ||
@@ -2475,9 +2475,9 @@ static void rs_dbgfs_set_mcs(struct iwl_lq_sta *lq_sta, | |||
2475 | else | 2475 | else |
2476 | *rate_n_flags = 0x820A; | 2476 | *rate_n_flags = 0x820A; |
2477 | } | 2477 | } |
2478 | IWL_DEBUG_RATE("Fixed rate ON\n"); | 2478 | IWL_DEBUG_RATE(priv, "Fixed rate ON\n"); |
2479 | } else { | 2479 | } else { |
2480 | IWL_DEBUG_RATE("Fixed rate OFF\n"); | 2480 | IWL_DEBUG_RATE(priv, "Fixed rate OFF\n"); |
2481 | } | 2481 | } |
2482 | } | 2482 | } |
2483 | 2483 | ||
@@ -2506,7 +2506,7 @@ static ssize_t rs_sta_dbgfs_scale_table_write(struct file *file, | |||
2506 | lq_sta->active_mimo2_rate = 0x1FD0; /* 6 - 60 MBits, no 9, no CCK */ | 2506 | lq_sta->active_mimo2_rate = 0x1FD0; /* 6 - 60 MBits, no 9, no CCK */ |
2507 | lq_sta->active_mimo3_rate = 0x1FD0; /* 6 - 60 MBits, no 9, no CCK */ | 2507 | lq_sta->active_mimo3_rate = 0x1FD0; /* 6 - 60 MBits, no 9, no CCK */ |
2508 | 2508 | ||
2509 | IWL_DEBUG_RATE("sta_id %d rate 0x%X\n", | 2509 | IWL_DEBUG_RATE(priv, "sta_id %d rate 0x%X\n", |
2510 | lq_sta->lq.sta_id, lq_sta->dbg_fixed_rate); | 2510 | lq_sta->lq.sta_id, lq_sta->dbg_fixed_rate); |
2511 | 2511 | ||
2512 | if (lq_sta->dbg_fixed_rate) { | 2512 | if (lq_sta->dbg_fixed_rate) { |