40 static u8 _rtl_rc_get_highest_rix(
struct rtl_priv *rtlpriv,
66 wireless_mode = rtlmac->
mode;
79 if (get_rf_type(rtlphy) !=
RF_2T2R)
88 if (get_rf_type(rtlphy) !=
RF_2T2R)
97 static void _rtl_rc_rate_set_series(
struct rtl_priv *rtlpriv,
101 u8 tries,
char rix,
int rtsctsenable,
112 rate->
idx = rix >= 0x00 ? rix : 0x00;
119 if (sta && (sta->
ht_cap.cap &
128 if (sta && sta->
ht_cap.ht_supported)
133 static void rtl_get_rate(
void *ppriv,
struct ieee80211_sta *sta,
141 u8 try_per_rate,
i, rix;
142 bool not_data = !ieee80211_is_data(fc);
147 rix = _rtl_rc_get_highest_rix(rtlpriv, sta, skb, not_data);
149 _rtl_rc_rate_set_series(rtlpriv, sta, &rates[0], txrc,
150 try_per_rate, rix, 1, not_data);
153 for (i = 1; i < 4; i++)
154 _rtl_rc_rate_set_series(rtlpriv, sta, &rates[i],
155 txrc, i, (rix - i), 1,
160 static bool _rtl_tx_aggr_check(
struct rtl_priv *rtlpriv,
179 static void rtl_tx_status(
void *ppriv,
187 __le16 fc = rtl_get_fc(skb);
190 if (!priv_sta || !ieee80211_is_data(fc))
196 if (is_multicast_ether_addr(ieee80211_get_DA(hdr))
197 || is_broadcast_ether_addr(ieee80211_get_DA(hdr)))
205 if (ieee80211_is_data_qos(fc)) {
206 u8 tid = rtl_get_tid(skb);
207 if (_rtl_tx_aggr_check(rtlpriv, sta_entry,
209 sta_entry->
tids[tid].agg.agg_state =
219 static void rtl_rate_init(
void *ppriv,
225 static void rtl_rate_update(
void *ppriv,
233 struct dentry *debugfsdir)
239 static void rtl_rate_free(
void *rtlpriv)
244 static void *rtl_rate_alloc_sta(
void *ppriv,
253 "Unable to allocate private rc structure\n");
262 static void rtl_rate_free_sta(
void *rtlpriv,
272 .alloc = rtl_rate_alloc,
273 .free = rtl_rate_free,
274 .alloc_sta = rtl_rate_alloc_sta,
275 .free_sta = rtl_rate_free_sta,
276 .rate_init = rtl_rate_init,
277 .rate_update = rtl_rate_update,
278 .tx_status = rtl_tx_status,
279 .get_rate = rtl_get_rate,