diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index c2a76785b665..b3931f6135a4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -630,7 +630,9 @@ static void iwl3945_pass_packet_to_mac80211(struct iwl3945_priv *priv, | |||
630 | struct ieee80211_rx_status *stats) | 630 | struct ieee80211_rx_status *stats) |
631 | { | 631 | { |
632 | struct iwl3945_rx_packet *pkt = (struct iwl3945_rx_packet *)rxb->skb->data; | 632 | struct iwl3945_rx_packet *pkt = (struct iwl3945_rx_packet *)rxb->skb->data; |
633 | #ifdef CONFIG_IWL3945_LEDS | ||
633 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)IWL_RX_DATA(pkt); | 634 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)IWL_RX_DATA(pkt); |
635 | #endif | ||
634 | struct iwl3945_rx_frame_hdr *rx_hdr = IWL_RX_HDR(pkt); | 636 | struct iwl3945_rx_frame_hdr *rx_hdr = IWL_RX_HDR(pkt); |
635 | struct iwl3945_rx_frame_end *rx_end = IWL_RX_END(pkt); | 637 | struct iwl3945_rx_frame_end *rx_end = IWL_RX_END(pkt); |
636 | short len = le16_to_cpu(rx_hdr->len); | 638 | short len = le16_to_cpu(rx_hdr->len); |
@@ -708,10 +710,7 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv, | |||
708 | return; | 710 | return; |
709 | } | 711 | } |
710 | 712 | ||
711 | if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) { | 713 | |
712 | iwl3945_pass_packet_to_mac80211(priv, rxb, &rx_status); | ||
713 | return; | ||
714 | } | ||
715 | 714 | ||
716 | /* Convert 3945's rssi indicator to dBm */ | 715 | /* Convert 3945's rssi indicator to dBm */ |
717 | rx_status.signal = rx_stats->rssi - IWL_RSSI_OFFSET; | 716 | rx_status.signal = rx_stats->rssi - IWL_RSSI_OFFSET; |
@@ -773,6 +772,11 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv, | |||
773 | priv->last_rx_noise = rx_status.noise; | 772 | priv->last_rx_noise = rx_status.noise; |
774 | } | 773 | } |
775 | 774 | ||
775 | if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) { | ||
776 | iwl3945_pass_packet_to_mac80211(priv, rxb, &rx_status); | ||
777 | return; | ||
778 | } | ||
779 | |||
776 | switch (le16_to_cpu(header->frame_control) & IEEE80211_FCTL_FTYPE) { | 780 | switch (le16_to_cpu(header->frame_control) & IEEE80211_FCTL_FTYPE) { |
777 | case IEEE80211_FTYPE_MGMT: | 781 | case IEEE80211_FTYPE_MGMT: |
778 | switch (le16_to_cpu(header->frame_control) & | 782 | switch (le16_to_cpu(header->frame_control) & |
@@ -791,8 +795,7 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv, | |||
791 | struct ieee80211_mgmt *mgmt = | 795 | struct ieee80211_mgmt *mgmt = |
792 | (struct ieee80211_mgmt *)header; | 796 | (struct ieee80211_mgmt *)header; |
793 | __le32 *pos; | 797 | __le32 *pos; |
794 | pos = | 798 | pos = (__le32 *)&mgmt->u.beacon. |
795 | (__le32 *) & mgmt->u.beacon. | ||
796 | timestamp; | 799 | timestamp; |
797 | priv->timestamp0 = le32_to_cpu(pos[0]); | 800 | priv->timestamp0 = le32_to_cpu(pos[0]); |
798 | priv->timestamp1 = le32_to_cpu(pos[1]); | 801 | priv->timestamp1 = le32_to_cpu(pos[1]); |
@@ -1505,7 +1508,7 @@ static int iwl3945_hw_reg_adjust_power_by_temp(int new_reading, int old_reading) | |||
1505 | */ | 1508 | */ |
1506 | static inline int iwl3945_hw_reg_temp_out_of_range(int temperature) | 1509 | static inline int iwl3945_hw_reg_temp_out_of_range(int temperature) |
1507 | { | 1510 | { |
1508 | return (((temperature < -260) || (temperature > 25)) ? 1 : 0); | 1511 | return ((temperature < -260) || (temperature > 25)) ? 1 : 0; |
1509 | } | 1512 | } |
1510 | 1513 | ||
1511 | int iwl3945_hw_get_temperature(struct iwl3945_priv *priv) | 1514 | int iwl3945_hw_get_temperature(struct iwl3945_priv *priv) |
@@ -2626,7 +2629,7 @@ unsigned int iwl3945_hw_get_beacon_cmd(struct iwl3945_priv *priv, | |||
2626 | tx_beacon_cmd->tx.supp_rates[1] = | 2629 | tx_beacon_cmd->tx.supp_rates[1] = |
2627 | (IWL_CCK_BASIC_RATES_MASK & 0xF); | 2630 | (IWL_CCK_BASIC_RATES_MASK & 0xF); |
2628 | 2631 | ||
2629 | return (sizeof(struct iwl3945_tx_beacon_cmd) + frame_size); | 2632 | return sizeof(struct iwl3945_tx_beacon_cmd) + frame_size; |
2630 | } | 2633 | } |
2631 | 2634 | ||
2632 | void iwl3945_hw_rx_handler_setup(struct iwl3945_priv *priv) | 2635 | void iwl3945_hw_rx_handler_setup(struct iwl3945_priv *priv) |