|
@@ -673,7 +673,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
|
|
|
s8 scale_action = 0;
|
|
|
unsigned long flags;
|
|
|
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
|
|
- u16 fc;
|
|
|
+ __le16 fc;
|
|
|
u16 rate_mask = sta ? sta->supp_rates[sband->band] : 0;
|
|
|
s8 max_rate_idx = -1;
|
|
|
struct iwl_priv *priv = (struct iwl_priv *)priv_r;
|
|
@@ -682,9 +682,8 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
|
|
|
IWL_DEBUG_RATE(priv, "enter\n");
|
|
|
|
|
|
/* Send management frames and NO_ACK data using lowest rate. */
|
|
|
- fc = le16_to_cpu(hdr->frame_control);
|
|
|
- if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA ||
|
|
|
- info->flags & IEEE80211_TX_CTL_NO_ACK ||
|
|
|
+ fc = hdr->frame_control;
|
|
|
+ if (!ieee80211_is_data(fc) || info->flags & IEEE80211_TX_CTL_NO_ACK ||
|
|
|
!sta || !priv_sta) {
|
|
|
IWL_DEBUG_RATE(priv, "leave: No STA priv data to update!\n");
|
|
|
info->control.rates[0].idx = rate_lowest_index(sband, sta);
|