aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-07-14 20:14:07 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-24 15:05:16 -0400
commit943ab70f6aebfdc0005ef7e58ae982e9ec22224b (patch)
treecf42f0564618d9399a6eadcd7007c18c78d9a9a6 /drivers
parente8986436580caf50ebbd3bf8371074aadf95aba5 (diff)
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: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-rs.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c5
2 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
index b23fd537f21..2b776924d5e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
@@ -673,7 +673,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
673 s8 scale_action = 0; 673 s8 scale_action = 0;
674 unsigned long flags; 674 unsigned long flags;
675 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 675 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
676 u16 fc; 676 __le16 fc;
677 u16 rate_mask = sta ? sta->supp_rates[sband->band] : 0; 677 u16 rate_mask = sta ? sta->supp_rates[sband->band] : 0;
678 s8 max_rate_idx = -1; 678 s8 max_rate_idx = -1;
679 struct iwl_priv *priv = (struct iwl_priv *)priv_r; 679 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 IWL_DEBUG_RATE(priv, "enter\n"); 682 IWL_DEBUG_RATE(priv, "enter\n");
683 683
684 /* Send management frames and NO_ACK data using lowest rate. */ 684 /* Send management frames and NO_ACK data using lowest rate. */
685 fc = le16_to_cpu(hdr->frame_control); 685 fc = hdr->frame_control;
686 if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA || 686 if (!ieee80211_is_data(fc) || info->flags & IEEE80211_TX_CTL_NO_ACK ||
687 info->flags & IEEE80211_TX_CTL_NO_ACK ||
688 !sta || !priv_sta) { 687 !sta || !priv_sta) {
689 IWL_DEBUG_RATE(priv, "leave: No STA priv data to update!\n"); 688 IWL_DEBUG_RATE(priv, "leave: No STA priv data to update!\n");
690 info->control.rates[0].idx = rate_lowest_index(sband, sta); 689 info->control.rates[0].idx = rate_lowest_index(sband, sta);
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index 2addf735b19..afa1633602a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -1044,11 +1044,10 @@ EXPORT_SYMBOL(iwl_rxon_add_station);
1044int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) 1044int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
1045{ 1045{
1046 int sta_id; 1046 int sta_id;
1047 u16 fc = le16_to_cpu(hdr->frame_control); 1047 __le16 fc = hdr->frame_control;
1048 1048
1049 /* If this frame is broadcast or management, use broadcast station id */ 1049 /* If this frame is broadcast or management, use broadcast station id */
1050 if (((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA) || 1050 if (!ieee80211_is_data(fc) || is_multicast_ether_addr(hdr->addr1))
1051 is_multicast_ether_addr(hdr->addr1))
1052 return priv->hw_params.bcast_sta_id; 1051 return priv->hw_params.bcast_sta_id;
1053 1052
1054 switch (priv->iw_mode) { 1053 switch (priv->iw_mode) {