diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/rs.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/rs.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/rs.c b/drivers/net/wireless/iwlwifi/mvm/rs.c index d6d28d7b442b..ba078a3322b8 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/iwlwifi/mvm/rs.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /****************************************************************************** | 1 | /****************************************************************************** |
2 | * | 2 | * |
3 | * Copyright(c) 2005 - 2013 Intel Corporation. All rights reserved. | 3 | * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of version 2 of the GNU General Public License as | 6 | * under the terms of version 2 of the GNU General Public License as |
@@ -24,7 +24,6 @@ | |||
24 | * | 24 | * |
25 | *****************************************************************************/ | 25 | *****************************************************************************/ |
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/init.h> | ||
28 | #include <linux/skbuff.h> | 27 | #include <linux/skbuff.h> |
29 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
30 | #include <net/mac80211.h> | 29 | #include <net/mac80211.h> |
@@ -700,7 +699,7 @@ static int rs_rate_from_ucode_rate(const u32 ucode_rate, | |||
700 | u8 num_of_ant = get_num_of_ant_from_rate(ucode_rate); | 699 | u8 num_of_ant = get_num_of_ant_from_rate(ucode_rate); |
701 | u8 nss; | 700 | u8 nss; |
702 | 701 | ||
703 | memset(rate, 0, sizeof(struct rs_rate)); | 702 | memset(rate, 0, sizeof(*rate)); |
704 | rate->index = iwl_hwrate_to_plcp_idx(ucode_rate); | 703 | rate->index = iwl_hwrate_to_plcp_idx(ucode_rate); |
705 | 704 | ||
706 | if (rate->index == IWL_RATE_INVALID) { | 705 | if (rate->index == IWL_RATE_INVALID) { |
@@ -2121,7 +2120,7 @@ static void rs_initialize_lq(struct iwl_mvm *mvm, | |||
2121 | tbl->column = RS_COLUMN_LEGACY_ANT_B; | 2120 | tbl->column = RS_COLUMN_LEGACY_ANT_B; |
2122 | 2121 | ||
2123 | rs_set_expected_tpt_table(lq_sta, tbl); | 2122 | rs_set_expected_tpt_table(lq_sta, tbl); |
2124 | rs_fill_lq_cmd(NULL, NULL, lq_sta, rate); | 2123 | rs_fill_lq_cmd(mvm, sta, lq_sta, rate); |
2125 | /* TODO restore station should remember the lq cmd */ | 2124 | /* TODO restore station should remember the lq cmd */ |
2126 | iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq, init); | 2125 | iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq, init); |
2127 | } | 2126 | } |
@@ -2446,10 +2445,9 @@ static void rs_build_rates_table(struct iwl_mvm *mvm, | |||
2446 | struct iwl_lq_cmd *lq_cmd = &lq_sta->lq; | 2445 | struct iwl_lq_cmd *lq_cmd = &lq_sta->lq; |
2447 | bool toggle_ant = false; | 2446 | bool toggle_ant = false; |
2448 | 2447 | ||
2449 | memcpy(&rate, initial_rate, sizeof(struct rs_rate)); | 2448 | memcpy(&rate, initial_rate, sizeof(rate)); |
2450 | 2449 | ||
2451 | if (mvm) | 2450 | valid_tx_ant = iwl_fw_valid_tx_ant(mvm->fw); |
2452 | valid_tx_ant = iwl_fw_valid_tx_ant(mvm->fw); | ||
2453 | 2451 | ||
2454 | if (is_siso(&rate)) { | 2452 | if (is_siso(&rate)) { |
2455 | num_rates = RS_INITIAL_SISO_NUM_RATES; | 2453 | num_rates = RS_INITIAL_SISO_NUM_RATES; |
@@ -2623,7 +2621,7 @@ static void rs_program_fix_rate(struct iwl_mvm *mvm, | |||
2623 | struct rs_rate rate; | 2621 | struct rs_rate rate; |
2624 | rs_rate_from_ucode_rate(lq_sta->dbg_fixed_rate, | 2622 | rs_rate_from_ucode_rate(lq_sta->dbg_fixed_rate, |
2625 | lq_sta->band, &rate); | 2623 | lq_sta->band, &rate); |
2626 | rs_fill_lq_cmd(NULL, NULL, lq_sta, &rate); | 2624 | rs_fill_lq_cmd(mvm, NULL, lq_sta, &rate); |
2627 | iwl_mvm_send_lq_cmd(lq_sta->drv, &lq_sta->lq, false); | 2625 | iwl_mvm_send_lq_cmd(lq_sta->drv, &lq_sta->lq, false); |
2628 | } | 2626 | } |
2629 | } | 2627 | } |