Search Linux Wireless

Re: [PATCH v2 13/15] iwlwifi: use ieee80211_is_data(fc)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 6, 2009 at 2:03 AM, Luis R. Rodriguez<lrodriguez@xxxxxxxxxxx> wrote:
> Cc: Zhu Yi <yi.zhu@xxxxxxxxx>
> Cc: Reinette Chatre <reinette.chatre@xxxxxxxxx>
> Cc: ipw3945-devel@xxxxxxxxxxxxxxxxxxxxx
> Signed-off-by: Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx>
> ---
>  drivers/net/wireless/iwlwifi/iwl-3945-rs.c |    7 +++----
>  drivers/net/wireless/iwlwifi/iwl-sta.c     |    5 ++---
>  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 5eb538d..bd2f709 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,
>        s8 scale_action = 0;
>        unsigned long flags;
>        struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
> -       u16 fc;
> +       __le16 fc;
>        u16 rate_mask = 0;
>        s8 max_rate_idx = -1;
>        struct iwl_priv *priv = (struct iwl_priv *)priv_r;
> @@ -685,9 +685,8 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
>                rate_mask = sta->supp_rates[sband->band];
>
>        /* 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 ||

iwl-agn-rs.c also needs this change I think...

>            !sta || !priv_sta) {
>                IWL_DEBUG_RATE(priv, "leave: No STA priv data to update!\n");
>                if (!rate_mask)
> diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
> index 2addf73..afa1633 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);
>  int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
>  {
>        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 (((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA) ||
> -           is_multicast_ether_addr(hdr->addr1))
> +       if (!ieee80211_is_data(fc) ||  is_multicast_ether_addr(hdr->addr1))
>                return priv->hw_params.bcast_sta_id;
>
>        switch (priv->iw_mode) {
> --
> 1.6.0.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux