提交 943ab70f 编写于 作者: L Luis R. Rodriguez 提交者: John W. Linville

iwlwifi: use ieee80211_is_data(fc)

iwl-agn-rs.c already uses this.

Cc: Zhu Yi <yi.zhu@intel.com>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Cc: ipw3945-devel@lists.sourceforge.net
Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 e8986436
...@@ -673,7 +673,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, ...@@ -673,7 +673,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
s8 scale_action = 0; s8 scale_action = 0;
unsigned long flags; unsigned long flags;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
u16 fc; __le16 fc;
u16 rate_mask = sta ? sta->supp_rates[sband->band] : 0; u16 rate_mask = sta ? sta->supp_rates[sband->band] : 0;
s8 max_rate_idx = -1; s8 max_rate_idx = -1;
struct iwl_priv *priv = (struct iwl_priv *)priv_r; 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, ...@@ -682,9 +682,8 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
IWL_DEBUG_RATE(priv, "enter\n"); IWL_DEBUG_RATE(priv, "enter\n");
/* Send management frames and NO_ACK data using lowest rate. */ /* Send management frames and NO_ACK data using lowest rate. */
fc = le16_to_cpu(hdr->frame_control); fc = hdr->frame_control;
if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA || if (!ieee80211_is_data(fc) || info->flags & IEEE80211_TX_CTL_NO_ACK ||
info->flags & IEEE80211_TX_CTL_NO_ACK ||
!sta || !priv_sta) { !sta || !priv_sta) {
IWL_DEBUG_RATE(priv, "leave: No STA priv data to update!\n"); IWL_DEBUG_RATE(priv, "leave: No STA priv data to update!\n");
info->control.rates[0].idx = rate_lowest_index(sband, sta); info->control.rates[0].idx = rate_lowest_index(sband, sta);
......
...@@ -1044,11 +1044,10 @@ EXPORT_SYMBOL(iwl_rxon_add_station); ...@@ -1044,11 +1044,10 @@ EXPORT_SYMBOL(iwl_rxon_add_station);
int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
{ {
int sta_id; int sta_id;
u16 fc = le16_to_cpu(hdr->frame_control); __le16 fc = hdr->frame_control;
/* If this frame is broadcast or management, use broadcast station id */ /* If this frame is broadcast or management, use broadcast station id */
if (((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA) || if (!ieee80211_is_data(fc) || is_multicast_ether_addr(hdr->addr1))
is_multicast_ether_addr(hdr->addr1))
return priv->hw_params.bcast_sta_id; return priv->hw_params.bcast_sta_id;
switch (priv->iw_mode) { switch (priv->iw_mode) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册