diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-commands.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 5 |
6 files changed, 25 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 8684f2639716..43e078b87378 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -764,10 +764,10 @@ static void iwl_bg_ucode_trace(unsigned long data) | |||
764 | static void iwl_rx_beacon_notif(struct iwl_priv *priv, | 764 | static void iwl_rx_beacon_notif(struct iwl_priv *priv, |
765 | struct iwl_rx_mem_buffer *rxb) | 765 | struct iwl_rx_mem_buffer *rxb) |
766 | { | 766 | { |
767 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
768 | struct iwl_rx_packet *pkt = rxb_addr(rxb); | 767 | struct iwl_rx_packet *pkt = rxb_addr(rxb); |
769 | struct iwl4965_beacon_notif *beacon = | 768 | struct iwl4965_beacon_notif *beacon = |
770 | (struct iwl4965_beacon_notif *)pkt->u.raw; | 769 | (struct iwl4965_beacon_notif *)pkt->u.raw; |
770 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
771 | u8 rate = iwl_hw_get_rate(beacon->beacon_notify_hdr.rate_n_flags); | 771 | u8 rate = iwl_hw_get_rate(beacon->beacon_notify_hdr.rate_n_flags); |
772 | 772 | ||
773 | IWL_DEBUG_RX(priv, "beacon status %x retries %d iss %d " | 773 | IWL_DEBUG_RX(priv, "beacon status %x retries %d iss %d " |
@@ -779,6 +779,8 @@ static void iwl_rx_beacon_notif(struct iwl_priv *priv, | |||
779 | le32_to_cpu(beacon->low_tsf), rate); | 779 | le32_to_cpu(beacon->low_tsf), rate); |
780 | #endif | 780 | #endif |
781 | 781 | ||
782 | priv->ibss_manager = le32_to_cpu(beacon->ibss_mgr_status); | ||
783 | |||
782 | if ((priv->iw_mode == NL80211_IFTYPE_AP) && | 784 | if ((priv->iw_mode == NL80211_IFTYPE_AP) && |
783 | (!test_bit(STATUS_EXIT_PENDING, &priv->status))) | 785 | (!test_bit(STATUS_EXIT_PENDING, &priv->status))) |
784 | queue_work(priv->workqueue, &priv->beacon_update); | 786 | queue_work(priv->workqueue, &priv->beacon_update); |
@@ -3881,6 +3883,7 @@ static struct ieee80211_ops iwl_hw_ops = { | |||
3881 | .sta_remove = iwl_mac_sta_remove, | 3883 | .sta_remove = iwl_mac_sta_remove, |
3882 | .channel_switch = iwl_mac_channel_switch, | 3884 | .channel_switch = iwl_mac_channel_switch, |
3883 | .flush = iwl_mac_flush, | 3885 | .flush = iwl_mac_flush, |
3886 | .tx_last_beacon = iwl_mac_tx_last_beacon, | ||
3884 | }; | 3887 | }; |
3885 | 3888 | ||
3886 | static void iwl_hw_detect(struct iwl_priv *priv) | 3889 | static void iwl_hw_detect(struct iwl_priv *priv) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index 60725a5c1b69..9435fd934d5e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h | |||
@@ -2919,6 +2919,11 @@ struct iwl_scancomplete_notification { | |||
2919 | * | 2919 | * |
2920 | *****************************************************************************/ | 2920 | *****************************************************************************/ |
2921 | 2921 | ||
2922 | enum iwl_ibss_manager { | ||
2923 | IWL_NOT_IBSS_MANAGER = 0, | ||
2924 | IWL_IBSS_MANAGER = 1, | ||
2925 | }; | ||
2926 | |||
2922 | /* | 2927 | /* |
2923 | * BEACON_NOTIFICATION = 0x90 (notification only, not a command) | 2928 | * BEACON_NOTIFICATION = 0x90 (notification only, not a command) |
2924 | */ | 2929 | */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 78882f9ab459..ccdf3c02bb3c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -1666,6 +1666,14 @@ int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
1666 | } | 1666 | } |
1667 | EXPORT_SYMBOL(iwl_mac_conf_tx); | 1667 | EXPORT_SYMBOL(iwl_mac_conf_tx); |
1668 | 1668 | ||
1669 | int iwl_mac_tx_last_beacon(struct ieee80211_hw *hw) | ||
1670 | { | ||
1671 | struct iwl_priv *priv = hw->priv; | ||
1672 | |||
1673 | return priv->ibss_manager == IWL_IBSS_MANAGER; | ||
1674 | } | ||
1675 | EXPORT_SYMBOL_GPL(iwl_mac_tx_last_beacon); | ||
1676 | |||
1669 | static void iwl_ht_conf(struct iwl_priv *priv, | 1677 | static void iwl_ht_conf(struct iwl_priv *priv, |
1670 | struct ieee80211_vif *vif) | 1678 | struct ieee80211_vif *vif) |
1671 | { | 1679 | { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index cca7428c238f..7f1aaf206078 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -350,6 +350,7 @@ struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg, | |||
350 | void iwl_activate_qos(struct iwl_priv *priv); | 350 | void iwl_activate_qos(struct iwl_priv *priv); |
351 | int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, | 351 | int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, |
352 | const struct ieee80211_tx_queue_params *params); | 352 | const struct ieee80211_tx_queue_params *params); |
353 | int iwl_mac_tx_last_beacon(struct ieee80211_hw *hw); | ||
353 | void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt); | 354 | void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt); |
354 | int iwl_check_rxon_cmd(struct iwl_priv *priv); | 355 | int iwl_check_rxon_cmd(struct iwl_priv *priv); |
355 | int iwl_full_rxon_required(struct iwl_priv *priv); | 356 | int iwl_full_rxon_required(struct iwl_priv *priv); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index f35bcad56e36..599635547021 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -1109,6 +1109,9 @@ struct iwl_priv { | |||
1109 | u32 ucode_beacon_time; | 1109 | u32 ucode_beacon_time; |
1110 | int missed_beacon_threshold; | 1110 | int missed_beacon_threshold; |
1111 | 1111 | ||
1112 | /* track IBSS manager (last beacon) status */ | ||
1113 | u32 ibss_manager; | ||
1114 | |||
1112 | /* storing the jiffies when the plcp error rate is received */ | 1115 | /* storing the jiffies when the plcp error rate is received */ |
1113 | unsigned long plcp_jiffies; | 1116 | unsigned long plcp_jiffies; |
1114 | 1117 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index de6d592af748..b14eaf91c7c2 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -814,9 +814,9 @@ static void iwl3945_bg_beacon_update(struct work_struct *work) | |||
814 | static void iwl3945_rx_beacon_notif(struct iwl_priv *priv, | 814 | static void iwl3945_rx_beacon_notif(struct iwl_priv *priv, |
815 | struct iwl_rx_mem_buffer *rxb) | 815 | struct iwl_rx_mem_buffer *rxb) |
816 | { | 816 | { |
817 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
818 | struct iwl_rx_packet *pkt = rxb_addr(rxb); | 817 | struct iwl_rx_packet *pkt = rxb_addr(rxb); |
819 | struct iwl3945_beacon_notif *beacon = &(pkt->u.beacon_status); | 818 | struct iwl3945_beacon_notif *beacon = &(pkt->u.beacon_status); |
819 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
820 | u8 rate = beacon->beacon_notify_hdr.rate; | 820 | u8 rate = beacon->beacon_notify_hdr.rate; |
821 | 821 | ||
822 | IWL_DEBUG_RX(priv, "beacon status %x retries %d iss %d " | 822 | IWL_DEBUG_RX(priv, "beacon status %x retries %d iss %d " |
@@ -828,6 +828,8 @@ static void iwl3945_rx_beacon_notif(struct iwl_priv *priv, | |||
828 | le32_to_cpu(beacon->low_tsf), rate); | 828 | le32_to_cpu(beacon->low_tsf), rate); |
829 | #endif | 829 | #endif |
830 | 830 | ||
831 | priv->ibss_manager = le32_to_cpu(beacon->ibss_mgr_status); | ||
832 | |||
831 | if ((priv->iw_mode == NL80211_IFTYPE_AP) && | 833 | if ((priv->iw_mode == NL80211_IFTYPE_AP) && |
832 | (!test_bit(STATUS_EXIT_PENDING, &priv->status))) | 834 | (!test_bit(STATUS_EXIT_PENDING, &priv->status))) |
833 | queue_work(priv->workqueue, &priv->beacon_update); | 835 | queue_work(priv->workqueue, &priv->beacon_update); |
@@ -3803,6 +3805,7 @@ static struct ieee80211_ops iwl3945_hw_ops = { | |||
3803 | .hw_scan = iwl_mac_hw_scan, | 3805 | .hw_scan = iwl_mac_hw_scan, |
3804 | .sta_add = iwl3945_mac_sta_add, | 3806 | .sta_add = iwl3945_mac_sta_add, |
3805 | .sta_remove = iwl_mac_sta_remove, | 3807 | .sta_remove = iwl_mac_sta_remove, |
3808 | .tx_last_beacon = iwl_mac_tx_last_beacon, | ||
3806 | }; | 3809 | }; |
3807 | 3810 | ||
3808 | static int iwl3945_init_drv(struct iwl_priv *priv) | 3811 | static int iwl3945_init_drv(struct iwl_priv *priv) |