Skip to content

Commit

Permalink
iwlwifi: set HT flags in ieee80211_rx_status for received packets
Browse files Browse the repository at this point in the history
Add code to set the HT flags (HT, 40 MHz, Short guard interval) in
the ieee80211_rx_status field passed to mac80211.  This ensures that mac80211
processes these HT packets correctly.

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Daniel C Halperin authored and John W. Linville committed Aug 28, 2009
1 parent 7ebaeff commit c5f8cdb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/net/wireless/iwlwifi/iwl-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@ void iwl_rx_reply_rx(struct iwl_priv *priv,
u32 len;
u32 ampdu_status;
u16 fc;
u32 rate_n_flags;

/**
* REPLY_RX and REPLY_RX_MPDU_CMD are handled differently.
Expand Down Expand Up @@ -1032,6 +1033,15 @@ void iwl_rx_reply_rx(struct iwl_priv *priv,
if (phy_res->phy_flags & RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK)
rx_status.flag |= RX_FLAG_SHORTPRE;

/* Set up the HT phy flags */
rate_n_flags = le32_to_cpu(phy_res->rate_n_flags);
if (rate_n_flags & RATE_MCS_HT_MSK)
rx_status.flag |= RX_FLAG_HT;
if (rate_n_flags & RATE_MCS_HT40_MSK)
rx_status.flag |= RX_FLAG_40MHZ;
if (rate_n_flags & RATE_MCS_SGI_MSK)
rx_status.flag |= RX_FLAG_SHORT_GI;

if (iwl_is_network_packet(priv, header)) {
priv->last_rx_rssi = rx_status.signal;
priv->last_beacon_time = priv->ucode_beacon_time;
Expand Down

0 comments on commit c5f8cdb

Please sign in to comment.