diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 73 |
1 files changed, 44 insertions, 29 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index ba35b3ac7c7e..e624f2a41e0e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -164,6 +164,7 @@ u8 iwl_hw_find_station(struct iwl_priv *priv, const u8 *addr) | |||
164 | int start = 0; | 164 | int start = 0; |
165 | int ret = IWL_INVALID_STATION; | 165 | int ret = IWL_INVALID_STATION; |
166 | unsigned long flags; | 166 | unsigned long flags; |
167 | DECLARE_MAC_BUF(mac); | ||
167 | 168 | ||
168 | if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) || | 169 | if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) || |
169 | (priv->iw_mode == IEEE80211_IF_TYPE_AP)) | 170 | (priv->iw_mode == IEEE80211_IF_TYPE_AP)) |
@@ -181,8 +182,8 @@ u8 iwl_hw_find_station(struct iwl_priv *priv, const u8 *addr) | |||
181 | goto out; | 182 | goto out; |
182 | } | 183 | } |
183 | 184 | ||
184 | IWL_DEBUG_ASSOC("can not find STA " MAC_FMT " total %d\n", | 185 | IWL_DEBUG_ASSOC("can not find STA %s total %d\n", |
185 | MAC_ARG(addr), priv->num_stations); | 186 | print_mac(mac, addr), priv->num_stations); |
186 | 187 | ||
187 | out: | 188 | out: |
188 | spin_unlock_irqrestore(&priv->sta_lock, flags); | 189 | spin_unlock_irqrestore(&priv->sta_lock, flags); |
@@ -3909,12 +3910,15 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv, | |||
3909 | case IEEE80211_STYPE_PROBE_REQ: | 3910 | case IEEE80211_STYPE_PROBE_REQ: |
3910 | if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && | 3911 | if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && |
3911 | !iwl_is_associated(priv)) { | 3912 | !iwl_is_associated(priv)) { |
3913 | DECLARE_MAC_BUF(mac1); | ||
3914 | DECLARE_MAC_BUF(mac2); | ||
3915 | DECLARE_MAC_BUF(mac3); | ||
3916 | |||
3912 | IWL_DEBUG_DROP("Dropping (non network): " | 3917 | IWL_DEBUG_DROP("Dropping (non network): " |
3913 | MAC_FMT ", " MAC_FMT ", " | 3918 | "%s, %s, %s\n", |
3914 | MAC_FMT "\n", | 3919 | print_mac(mac1, header->addr1), |
3915 | MAC_ARG(header->addr1), | 3920 | print_mac(mac2, header->addr2), |
3916 | MAC_ARG(header->addr2), | 3921 | print_mac(mac3, header->addr3)); |
3917 | MAC_ARG(header->addr3)); | ||
3918 | return; | 3922 | return; |
3919 | } | 3923 | } |
3920 | } | 3924 | } |
@@ -3936,28 +3940,31 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv, | |||
3936 | 3940 | ||
3937 | break; | 3941 | break; |
3938 | 3942 | ||
3939 | case IEEE80211_FTYPE_DATA: | 3943 | case IEEE80211_FTYPE_DATA: { |
3944 | DECLARE_MAC_BUF(mac1); | ||
3945 | DECLARE_MAC_BUF(mac2); | ||
3946 | DECLARE_MAC_BUF(mac3); | ||
3947 | |||
3940 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) | 3948 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) |
3941 | iwl4965_update_ps_mode(priv, fc & IEEE80211_FCTL_PM, | 3949 | iwl4965_update_ps_mode(priv, fc & IEEE80211_FCTL_PM, |
3942 | header->addr2); | 3950 | header->addr2); |
3943 | 3951 | ||
3944 | if (unlikely(!network_packet)) | 3952 | if (unlikely(!network_packet)) |
3945 | IWL_DEBUG_DROP("Dropping (non network): " | 3953 | IWL_DEBUG_DROP("Dropping (non network): " |
3946 | MAC_FMT ", " MAC_FMT ", " | 3954 | "%s, %s, %s\n", |
3947 | MAC_FMT "\n", | 3955 | print_mac(mac1, header->addr1), |
3948 | MAC_ARG(header->addr1), | 3956 | print_mac(mac2, header->addr2), |
3949 | MAC_ARG(header->addr2), | 3957 | print_mac(mac3, header->addr3)); |
3950 | MAC_ARG(header->addr3)); | ||
3951 | else if (unlikely(is_duplicate_packet(priv, header))) | 3958 | else if (unlikely(is_duplicate_packet(priv, header))) |
3952 | IWL_DEBUG_DROP("Dropping (dup): " MAC_FMT ", " | 3959 | IWL_DEBUG_DROP("Dropping (dup): %s, %s, %s\n", |
3953 | MAC_FMT ", " MAC_FMT "\n", | 3960 | print_mac(mac1, header->addr1), |
3954 | MAC_ARG(header->addr1), | 3961 | print_mac(mac2, header->addr2), |
3955 | MAC_ARG(header->addr2), | 3962 | print_mac(mac3, header->addr3)); |
3956 | MAC_ARG(header->addr3)); | ||
3957 | else | 3963 | else |
3958 | iwl4965_handle_data_packet(priv, 1, include_phy, rxb, | 3964 | iwl4965_handle_data_packet(priv, 1, include_phy, rxb, |
3959 | &stats); | 3965 | &stats); |
3960 | break; | 3966 | break; |
3967 | } | ||
3961 | default: | 3968 | default: |
3962 | break; | 3969 | break; |
3963 | 3970 | ||
@@ -4106,10 +4113,12 @@ static void iwl4965_rx_reply_compressed_ba(struct iwl_priv *priv, | |||
4106 | 4113 | ||
4107 | /* TODO: Need to get this copy more sefely - now good for debug */ | 4114 | /* TODO: Need to get this copy more sefely - now good for debug */ |
4108 | /* | 4115 | /* |
4109 | IWL_DEBUG_TX_REPLY("REPLY_COMPRESSED_BA [%d]Received from " MAC_FMT ", | 4116 | { |
4110 | sta_id = %d\n", | 4117 | DECLARE_MAC_BUF(mac); |
4118 | IWL_DEBUG_TX_REPLY("REPLY_COMPRESSED_BA [%d]Received from %s, " | ||
4119 | "sta_id = %d\n", | ||
4111 | agg->wait_for_ba, | 4120 | agg->wait_for_ba, |
4112 | MAC_ARG((u8*) &ba_resp->sta_addr_lo32), | 4121 | print_mac(mac, (u8*) &ba_resp->sta_addr_lo32), |
4113 | ba_resp->sta_id); | 4122 | ba_resp->sta_id); |
4114 | IWL_DEBUG_TX_REPLY("TID = %d, SeqCtl = %d, bitmap = 0x%X%X, scd_flow = " | 4123 | IWL_DEBUG_TX_REPLY("TID = %d, SeqCtl = %d, bitmap = 0x%X%X, scd_flow = " |
4115 | "%d, scd_ssn = %d\n", | 4124 | "%d, scd_ssn = %d\n", |
@@ -4123,6 +4132,7 @@ static void iwl4965_rx_reply_compressed_ba(struct iwl_priv *priv, | |||
4123 | agg->start_idx, | 4132 | agg->start_idx, |
4124 | agg->bitmap1, | 4133 | agg->bitmap1, |
4125 | agg->bitmap0); | 4134 | agg->bitmap0); |
4135 | } | ||
4126 | */ | 4136 | */ |
4127 | iwl4965_tx_status_reply_compressed_ba(priv, agg, ba_resp); | 4137 | iwl4965_tx_status_reply_compressed_ba(priv, agg, ba_resp); |
4128 | /* releases all the TFDs until the SSN */ | 4138 | /* releases all the TFDs until the SSN */ |
@@ -4539,14 +4549,15 @@ int iwl_mac_ht_tx_agg_start(struct ieee80211_hw *hw, u8 *da, u16 tid, | |||
4539 | int ssn = -1; | 4549 | int ssn = -1; |
4540 | unsigned long flags; | 4550 | unsigned long flags; |
4541 | struct iwl_tid_data *tid_data; | 4551 | struct iwl_tid_data *tid_data; |
4552 | DECLARE_MAC_BUF(mac); | ||
4542 | 4553 | ||
4543 | if (likely(tid < ARRAY_SIZE(default_tid_to_tx_fifo))) | 4554 | if (likely(tid < ARRAY_SIZE(default_tid_to_tx_fifo))) |
4544 | tx_fifo = default_tid_to_tx_fifo[tid]; | 4555 | tx_fifo = default_tid_to_tx_fifo[tid]; |
4545 | else | 4556 | else |
4546 | return -EINVAL; | 4557 | return -EINVAL; |
4547 | 4558 | ||
4548 | IWL_WARNING("iwl-AGG iwl_mac_ht_tx_agg_start on da=" MAC_FMT | 4559 | IWL_WARNING("iwl-AGG iwl_mac_ht_tx_agg_start on da=%s" |
4549 | " tid=%d\n", MAC_ARG(da), tid); | 4560 | " tid=%d\n", print_mac(mac, da), tid); |
4550 | 4561 | ||
4551 | sta_id = iwl_hw_find_station(priv, da); | 4562 | sta_id = iwl_hw_find_station(priv, da); |
4552 | if (sta_id == IWL_INVALID_STATION) | 4563 | if (sta_id == IWL_INVALID_STATION) |
@@ -4577,6 +4588,8 @@ int iwl_mac_ht_tx_agg_stop(struct ieee80211_hw *hw, u8 *da, u16 tid, | |||
4577 | int tx_fifo_id, txq_id, sta_id, ssn = -1; | 4588 | int tx_fifo_id, txq_id, sta_id, ssn = -1; |
4578 | struct iwl_tid_data *tid_data; | 4589 | struct iwl_tid_data *tid_data; |
4579 | int rc; | 4590 | int rc; |
4591 | DECLARE_MAC_BUF(mac); | ||
4592 | |||
4580 | if (!da) { | 4593 | if (!da) { |
4581 | IWL_ERROR("%s: da = NULL\n", __func__); | 4594 | IWL_ERROR("%s: da = NULL\n", __func__); |
4582 | return -EINVAL; | 4595 | return -EINVAL; |
@@ -4602,8 +4615,8 @@ int iwl_mac_ht_tx_agg_stop(struct ieee80211_hw *hw, u8 *da, u16 tid, | |||
4602 | return rc; | 4615 | return rc; |
4603 | 4616 | ||
4604 | iwl4965_ba_status(priv, tid, BA_STATUS_INITIATOR_DELBA); | 4617 | iwl4965_ba_status(priv, tid, BA_STATUS_INITIATOR_DELBA); |
4605 | IWL_DEBUG_INFO("iwl_mac_ht_tx_agg_stop on da=" MAC_FMT " tid=%d\n", | 4618 | IWL_DEBUG_INFO("iwl_mac_ht_tx_agg_stop on da=%s tid=%d\n", |
4606 | MAC_ARG(da), tid); | 4619 | print_mac(mac, da), tid); |
4607 | 4620 | ||
4608 | return 0; | 4621 | return 0; |
4609 | } | 4622 | } |
@@ -4613,9 +4626,10 @@ int iwl_mac_ht_rx_agg_start(struct ieee80211_hw *hw, u8 *da, | |||
4613 | { | 4626 | { |
4614 | struct iwl_priv *priv = hw->priv; | 4627 | struct iwl_priv *priv = hw->priv; |
4615 | int sta_id; | 4628 | int sta_id; |
4629 | DECLARE_MAC_BUF(mac); | ||
4616 | 4630 | ||
4617 | IWL_WARNING("iwl-AGG iwl_mac_ht_rx_agg_start on da=" MAC_FMT | 4631 | IWL_WARNING("iwl-AGG iwl_mac_ht_rx_agg_start on da=%s" |
4618 | " tid=%d\n", MAC_ARG(da), tid); | 4632 | " tid=%d\n", print_mac(mac, da), tid); |
4619 | sta_id = iwl_hw_find_station(priv, da); | 4633 | sta_id = iwl_hw_find_station(priv, da); |
4620 | iwl4965_sta_modify_add_ba_tid(priv, sta_id, tid, start_seq_num); | 4634 | iwl4965_sta_modify_add_ba_tid(priv, sta_id, tid, start_seq_num); |
4621 | return 0; | 4635 | return 0; |
@@ -4626,9 +4640,10 @@ int iwl_mac_ht_rx_agg_stop(struct ieee80211_hw *hw, u8 *da, | |||
4626 | { | 4640 | { |
4627 | struct iwl_priv *priv = hw->priv; | 4641 | struct iwl_priv *priv = hw->priv; |
4628 | int sta_id; | 4642 | int sta_id; |
4643 | DECLARE_MAC_BUF(mac); | ||
4629 | 4644 | ||
4630 | IWL_WARNING("iwl-AGG iwl_mac_ht_rx_agg_stop on da=" MAC_FMT " tid=%d\n", | 4645 | IWL_WARNING("iwl-AGG iwl_mac_ht_rx_agg_stop on da=%s tid=%d\n", |
4631 | MAC_ARG(da), tid); | 4646 | print_mac(mac, da), tid); |
4632 | sta_id = iwl_hw_find_station(priv, da); | 4647 | sta_id = iwl_hw_find_station(priv, da); |
4633 | iwl4965_sta_modify_del_ba_tid(priv, sta_id, tid); | 4648 | iwl4965_sta_modify_del_ba_tid(priv, sta_id, tid); |
4634 | return 0; | 4649 | return 0; |