diff options
| author | Abhijeet Kolekar <abhijeet.kolekar@intel.com> | 2008-09-02 23:26:28 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2008-09-08 14:23:15 -0400 |
| commit | 35d55b5cde00b7cae145b42ac2de741ca0a7e5a8 (patch) | |
| tree | f859bc6c529c561f3dc64556e3cc91f7432ccf8b | |
| parent | 322a9811a3ac1db7ddd11c959e8d9e438e97e8e6 (diff) | |
iwl3945: replace association and beacon hooks with bss_info_changed cb
Let mac80211 and bss_info_changed callback handle the association and
beacon changes.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 8dc26adc1975..1377c8190ecb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
| @@ -688,87 +688,6 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv, | |||
| 688 | 688 | ||
| 689 | switch (le16_to_cpu(header->frame_control) & IEEE80211_FCTL_FTYPE) { | 689 | switch (le16_to_cpu(header->frame_control) & IEEE80211_FCTL_FTYPE) { |
| 690 | case IEEE80211_FTYPE_MGMT: | 690 | case IEEE80211_FTYPE_MGMT: |
| 691 | switch (le16_to_cpu(header->frame_control) & | ||
| 692 | IEEE80211_FCTL_STYPE) { | ||
| 693 | case IEEE80211_STYPE_PROBE_RESP: | ||
| 694 | case IEEE80211_STYPE_BEACON:{ | ||
| 695 | /* If this is a beacon or probe response for | ||
| 696 | * our network then cache the beacon | ||
| 697 | * timestamp */ | ||
| 698 | if ((((priv->iw_mode == IEEE80211_IF_TYPE_STA) | ||
| 699 | && !compare_ether_addr(header->addr2, | ||
| 700 | priv->bssid)) || | ||
| 701 | ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) | ||
| 702 | && !compare_ether_addr(header->addr3, | ||
| 703 | priv->bssid)))) { | ||
| 704 | struct ieee80211_mgmt *mgmt = | ||
| 705 | (struct ieee80211_mgmt *)header; | ||
| 706 | __le32 *pos; | ||
| 707 | pos = (__le32 *)&mgmt->u.beacon. | ||
| 708 | timestamp; | ||
| 709 | priv->timestamp0 = le32_to_cpu(pos[0]); | ||
| 710 | priv->timestamp1 = le32_to_cpu(pos[1]); | ||
| 711 | priv->beacon_int = le16_to_cpu( | ||
| 712 | mgmt->u.beacon.beacon_int); | ||
| 713 | if (priv->call_post_assoc_from_beacon && | ||
| 714 | (priv->iw_mode == | ||
| 715 | IEEE80211_IF_TYPE_STA)) | ||
| 716 | queue_work(priv->workqueue, | ||
| 717 | &priv->post_associate.work); | ||
| 718 | |||
| 719 | priv->call_post_assoc_from_beacon = 0; | ||
| 720 | } | ||
| 721 | |||
| 722 | break; | ||
| 723 | } | ||
| 724 | |||
| 725 | case IEEE80211_STYPE_ACTION: | ||
| 726 | /* TODO: Parse 802.11h frames for CSA... */ | ||
| 727 | break; | ||
| 728 | |||
| 729 | /* | ||
| 730 | * TODO: Use the new callback function from | ||
| 731 | * mac80211 instead of sniffing these packets. | ||
| 732 | */ | ||
| 733 | case IEEE80211_STYPE_ASSOC_RESP: | ||
| 734 | case IEEE80211_STYPE_REASSOC_RESP:{ | ||
| 735 | struct ieee80211_mgmt *mgnt = | ||
| 736 | (struct ieee80211_mgmt *)header; | ||
| 737 | |||
| 738 | /* We have just associated, give some | ||
| 739 | * time for the 4-way handshake if | ||
| 740 | * any. Don't start scan too early. */ | ||
| 741 | priv->next_scan_jiffies = jiffies + | ||
| 742 | IWL_DELAY_NEXT_SCAN_AFTER_ASSOC; | ||
| 743 | |||
| 744 | priv->assoc_id = (~((1 << 15) | (1 << 14)) & | ||
| 745 | le16_to_cpu(mgnt->u. | ||
| 746 | assoc_resp.aid)); | ||
| 747 | priv->assoc_capability = | ||
| 748 | le16_to_cpu(mgnt->u.assoc_resp.capab_info); | ||
| 749 | if (priv->beacon_int) | ||
| 750 | queue_work(priv->workqueue, | ||
| 751 | &priv->post_associate.work); | ||
| 752 | else | ||
| 753 | priv->call_post_assoc_from_beacon = 1; | ||
| 754 | break; | ||
| 755 | } | ||
| 756 | |||
| 757 | case IEEE80211_STYPE_PROBE_REQ:{ | ||
| 758 | DECLARE_MAC_BUF(mac1); | ||
| 759 | DECLARE_MAC_BUF(mac2); | ||
| 760 | DECLARE_MAC_BUF(mac3); | ||
| 761 | if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) | ||
| 762 | IWL_DEBUG_DROP | ||
| 763 | ("Dropping (non network): %s" | ||
| 764 | ", %s, %s\n", | ||
| 765 | print_mac(mac1, header->addr1), | ||
| 766 | print_mac(mac2, header->addr2), | ||
| 767 | print_mac(mac3, header->addr3)); | ||
| 768 | return; | ||
| 769 | } | ||
| 770 | } | ||
| 771 | |||
| 772 | case IEEE80211_FTYPE_DATA: | 691 | case IEEE80211_FTYPE_DATA: |
| 773 | /* fall through */ | 692 | /* fall through */ |
| 774 | default: | 693 | default: |
