rate.c (1e87fec9fa52a6f7c223998d6bfbd3464eb37e31) | rate.c (bd718fc11d5b184701e7fd8302033e31a3a03ba8) |
---|---|
1/* 2 * Copyright 2002-2005, Instant802 Networks, Inc. 3 * Copyright 2005-2006, Devicescape Software, Inc. 4 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz> 5 * Copyright 2017 Intel Deutschland GmbH 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 872 unchanged lines hidden (view full) --- 881 struct ieee80211_tx_rate_control *txrc) 882{ 883 struct rate_control_ref *ref = sdata->local->rate_ctrl; 884 void *priv_sta = NULL; 885 struct ieee80211_sta *ista = NULL; 886 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(txrc->skb); 887 int i; 888 | 1/* 2 * Copyright 2002-2005, Instant802 Networks, Inc. 3 * Copyright 2005-2006, Devicescape Software, Inc. 4 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz> 5 * Copyright 2017 Intel Deutschland GmbH 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 872 unchanged lines hidden (view full) --- 881 struct ieee80211_tx_rate_control *txrc) 882{ 883 struct rate_control_ref *ref = sdata->local->rate_ctrl; 884 void *priv_sta = NULL; 885 struct ieee80211_sta *ista = NULL; 886 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(txrc->skb); 887 int i; 888 |
889 if (sta && test_sta_flag(sta, WLAN_STA_RATE_CONTROL)) { 890 ista = &sta->sta; 891 priv_sta = sta->rate_ctrl_priv; 892 } 893 | |
894 for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { 895 info->control.rates[i].idx = -1; 896 info->control.rates[i].flags = 0; 897 info->control.rates[i].count = 0; 898 } 899 900 if (ieee80211_hw_check(&sdata->local->hw, HAS_RATE_CONTROL)) 901 return; 902 | 889 for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { 890 info->control.rates[i].idx = -1; 891 info->control.rates[i].flags = 0; 892 info->control.rates[i].count = 0; 893 } 894 895 if (ieee80211_hw_check(&sdata->local->hw, HAS_RATE_CONTROL)) 896 return; 897 |
903 if (rate_control_send_low(ista, txrc)) | 898 if (rate_control_send_low(sta ? &sta->sta : NULL, txrc)) |
904 return; 905 | 899 return; 900 |
901 if (sta && test_sta_flag(sta, WLAN_STA_RATE_CONTROL)) { 902 ista = &sta->sta; 903 priv_sta = sta->rate_ctrl_priv; 904 } 905 |
|
906 if (ista) { 907 spin_lock_bh(&sta->rate_ctrl_lock); 908 ref->ops->get_rate(ref->priv, ista, priv_sta, txrc); 909 spin_unlock_bh(&sta->rate_ctrl_lock); 910 } else { 911 rate_control_send_low(NULL, txrc); 912 } 913 --- 83 unchanged lines hidden --- | 906 if (ista) { 907 spin_lock_bh(&sta->rate_ctrl_lock); 908 ref->ops->get_rate(ref->priv, ista, priv_sta, txrc); 909 spin_unlock_bh(&sta->rate_ctrl_lock); 910 } else { 911 rate_control_send_low(NULL, txrc); 912 } 913 --- 83 unchanged lines hidden --- |