diff options
author | Eyal Shapira <eyal@wizery.com> | 2013-12-03 11:34:52 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2013-12-17 12:39:48 -0500 |
commit | a0c38b21192c196305ea386d4830fa7b28ec08ef (patch) | |
tree | 308734451cd217c5520c4f3bd02a68cce0496694 | |
parent | 3fc07953bae891c6adb08ef594cc9c527804c9c3 (diff) |
iwlwifi: mvm: rs: move rs_program_fix_rate to cleanup ifdefs
Move rs_program_fix_rate right before it's caller where we're
already in the context of an ifdef CPTCFG_MAC80211_DEBUGFS so
we can get rid of the extra ifdefs surrounding the original
location.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/rs.c | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/rs.c b/drivers/net/wireless/iwlwifi/mvm/rs.c index bf6e29f5b4d0..83306a05ceaf 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/iwlwifi/mvm/rs.c | |||
@@ -504,30 +504,6 @@ static inline u8 rs_is_valid_ant(u8 valid_antenna, u8 ant_type) | |||
504 | return (ant_type & valid_antenna) == ant_type; | 504 | return (ant_type & valid_antenna) == ant_type; |
505 | } | 505 | } |
506 | 506 | ||
507 | #ifdef CONFIG_MAC80211_DEBUGFS | ||
508 | /** | ||
509 | * Program the device to use fixed rate for frame transmit | ||
510 | * This is for debugging/testing only | ||
511 | * once the device start use fixed rate, we need to reload the module | ||
512 | * to being back the normal operation. | ||
513 | */ | ||
514 | static void rs_program_fix_rate(struct iwl_mvm *mvm, | ||
515 | struct iwl_lq_sta *lq_sta) | ||
516 | { | ||
517 | lq_sta->active_legacy_rate = 0x0FFF; /* 1 - 54 MBits, includes CCK */ | ||
518 | lq_sta->active_siso_rate = 0x1FD0; /* 6 - 60 MBits, no 9, no CCK */ | ||
519 | lq_sta->active_mimo2_rate = 0x1FD0; /* 6 - 60 MBits, no 9, no CCK */ | ||
520 | |||
521 | IWL_DEBUG_RATE(mvm, "sta_id %d rate 0x%X\n", | ||
522 | lq_sta->lq.sta_id, lq_sta->dbg_fixed_rate); | ||
523 | |||
524 | if (lq_sta->dbg_fixed_rate) { | ||
525 | rs_fill_link_cmd(NULL, NULL, lq_sta, lq_sta->dbg_fixed_rate); | ||
526 | iwl_mvm_send_lq_cmd(lq_sta->drv, &lq_sta->lq, false); | ||
527 | } | ||
528 | } | ||
529 | #endif | ||
530 | |||
531 | static int rs_tl_turn_on_agg_for_tid(struct iwl_mvm *mvm, | 507 | static int rs_tl_turn_on_agg_for_tid(struct iwl_mvm *mvm, |
532 | struct iwl_lq_sta *lq_data, u8 tid, | 508 | struct iwl_lq_sta *lq_data, u8 tid, |
533 | struct ieee80211_sta *sta) | 509 | struct ieee80211_sta *sta) |
@@ -2612,6 +2588,28 @@ static int rs_pretty_print_rate(char *buf, const u32 rate) | |||
2612 | (rate & RATE_MCS_ZLF_MSK) ? "ZLF " : ""); | 2588 | (rate & RATE_MCS_ZLF_MSK) ? "ZLF " : ""); |
2613 | } | 2589 | } |
2614 | 2590 | ||
2591 | /** | ||
2592 | * Program the device to use fixed rate for frame transmit | ||
2593 | * This is for debugging/testing only | ||
2594 | * once the device start use fixed rate, we need to reload the module | ||
2595 | * to being back the normal operation. | ||
2596 | */ | ||
2597 | static void rs_program_fix_rate(struct iwl_mvm *mvm, | ||
2598 | struct iwl_lq_sta *lq_sta) | ||
2599 | { | ||
2600 | lq_sta->active_legacy_rate = 0x0FFF; /* 1 - 54 MBits, includes CCK */ | ||
2601 | lq_sta->active_siso_rate = 0x1FD0; /* 6 - 60 MBits, no 9, no CCK */ | ||
2602 | lq_sta->active_mimo2_rate = 0x1FD0; /* 6 - 60 MBits, no 9, no CCK */ | ||
2603 | |||
2604 | IWL_DEBUG_RATE(mvm, "sta_id %d rate 0x%X\n", | ||
2605 | lq_sta->lq.sta_id, lq_sta->dbg_fixed_rate); | ||
2606 | |||
2607 | if (lq_sta->dbg_fixed_rate) { | ||
2608 | rs_fill_link_cmd(NULL, NULL, lq_sta, lq_sta->dbg_fixed_rate); | ||
2609 | iwl_mvm_send_lq_cmd(lq_sta->drv, &lq_sta->lq, false); | ||
2610 | } | ||
2611 | } | ||
2612 | |||
2615 | static ssize_t rs_sta_dbgfs_scale_table_write(struct file *file, | 2613 | static ssize_t rs_sta_dbgfs_scale_table_write(struct file *file, |
2616 | const char __user *user_buf, size_t count, loff_t *ppos) | 2614 | const char __user *user_buf, size_t count, loff_t *ppos) |
2617 | { | 2615 | { |