diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2008-05-29 04:35:18 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-03 15:00:25 -0400 |
commit | 37a44211cbe27795dbb79b2ea7036ff784f18d73 (patch) | |
tree | 185eaefd9bc7c45e163f41ec75178373e3fd9e77 /drivers/net/wireless/iwlwifi | |
parent | 5e1dd8dc19dc2c1bacadda04a5c2478aa9516a1b (diff) |
iwlwifi: Rx handlers common use for 4965 and 5000
This patch moves Rx handlers from iwl 4965 only use to common use along
with iwl 5000, thus enables Rx path to iwl 5000.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 18 |
3 files changed, 20 insertions, 19 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 556e59ef70e1..aee7014bcb94 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -2689,7 +2689,7 @@ static inline void iwl4965_dbg_report_frame(struct iwl_priv *priv, | |||
2689 | 2689 | ||
2690 | /* Called for REPLY_RX (legacy ABG frames), or | 2690 | /* Called for REPLY_RX (legacy ABG frames), or |
2691 | * REPLY_RX_MPDU_CMD (HT high-throughput N frames). */ | 2691 | * REPLY_RX_MPDU_CMD (HT high-throughput N frames). */ |
2692 | static void iwl4965_rx_reply_rx(struct iwl_priv *priv, | 2692 | void iwl4965_rx_reply_rx(struct iwl_priv *priv, |
2693 | struct iwl_rx_mem_buffer *rxb) | 2693 | struct iwl_rx_mem_buffer *rxb) |
2694 | { | 2694 | { |
2695 | struct ieee80211_hdr *header; | 2695 | struct ieee80211_hdr *header; |
@@ -2863,17 +2863,6 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv, | |||
2863 | } | 2863 | } |
2864 | } | 2864 | } |
2865 | 2865 | ||
2866 | /* Cache phy data (Rx signal strength, etc) for HT frame (REPLY_RX_PHY_CMD). | ||
2867 | * This will be used later in iwl4965_rx_reply_rx() for REPLY_RX_MPDU_CMD. */ | ||
2868 | static void iwl4965_rx_reply_rx_phy(struct iwl_priv *priv, | ||
2869 | struct iwl_rx_mem_buffer *rxb) | ||
2870 | { | ||
2871 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; | ||
2872 | priv->last_phy_res[0] = 1; | ||
2873 | memcpy(&priv->last_phy_res[1], &(pkt->u.raw[0]), | ||
2874 | sizeof(struct iwl4965_rx_phy_res)); | ||
2875 | } | ||
2876 | |||
2877 | #ifdef CONFIG_IWL4965_HT | 2866 | #ifdef CONFIG_IWL4965_HT |
2878 | 2867 | ||
2879 | /** | 2868 | /** |
@@ -3522,11 +3511,7 @@ static void iwl4965_rx_handler_setup(struct iwl_priv *priv) | |||
3522 | { | 3511 | { |
3523 | /* Legacy Rx frames */ | 3512 | /* Legacy Rx frames */ |
3524 | priv->rx_handlers[REPLY_RX] = iwl4965_rx_reply_rx; | 3513 | priv->rx_handlers[REPLY_RX] = iwl4965_rx_reply_rx; |
3525 | 3514 | /* Tx response */ | |
3526 | /* High-throughput (HT) Rx frames */ | ||
3527 | priv->rx_handlers[REPLY_RX_PHY_CMD] = iwl4965_rx_reply_rx_phy; | ||
3528 | priv->rx_handlers[REPLY_RX_MPDU_CMD] = iwl4965_rx_reply_rx; | ||
3529 | |||
3530 | priv->rx_handlers[REPLY_TX] = iwl4965_rx_reply_tx; | 3515 | priv->rx_handlers[REPLY_TX] = iwl4965_rx_reply_tx; |
3531 | 3516 | ||
3532 | #ifdef CONFIG_IWL4965_HT | 3517 | #ifdef CONFIG_IWL4965_HT |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 8c258d6a61c9..a2b98179117e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -702,6 +702,8 @@ extern void iwl4965_hw_rx_statistics(struct iwl_priv *priv, | |||
702 | struct iwl_rx_mem_buffer *rxb); | 702 | struct iwl_rx_mem_buffer *rxb); |
703 | extern void iwl4965_disable_events(struct iwl_priv *priv); | 703 | extern void iwl4965_disable_events(struct iwl_priv *priv); |
704 | extern int iwl4965_get_temperature(const struct iwl_priv *priv); | 704 | extern int iwl4965_get_temperature(const struct iwl_priv *priv); |
705 | extern void iwl4965_rx_reply_rx(struct iwl_priv *priv, | ||
706 | struct iwl_rx_mem_buffer *rxb); | ||
705 | 707 | ||
706 | /** | 708 | /** |
707 | * iwl_find_station - Find station id for a given BSSID | 709 | * iwl_find_station - Find station id for a given BSSID |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 4322cd604f41..49e72d461474 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -1872,6 +1872,17 @@ static void iwl4965_rx_card_state_notif(struct iwl_priv *priv, | |||
1872 | wake_up_interruptible(&priv->wait_command_queue); | 1872 | wake_up_interruptible(&priv->wait_command_queue); |
1873 | } | 1873 | } |
1874 | 1874 | ||
1875 | /* Cache phy data (Rx signal strength, etc) for HT frame (REPLY_RX_PHY_CMD). | ||
1876 | * This will be used later in iwl4965_rx_reply_rx() for REPLY_RX_MPDU_CMD. */ | ||
1877 | static void iwl4965_rx_reply_rx_phy(struct iwl_priv *priv, | ||
1878 | struct iwl_rx_mem_buffer *rxb) | ||
1879 | { | ||
1880 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; | ||
1881 | priv->last_phy_res[0] = 1; | ||
1882 | memcpy(&priv->last_phy_res[1], &(pkt->u.raw[0]), | ||
1883 | sizeof(struct iwl4965_rx_phy_res)); | ||
1884 | } | ||
1885 | |||
1875 | /** | 1886 | /** |
1876 | * iwl4965_setup_rx_handlers - Initialize Rx handler callbacks | 1887 | * iwl4965_setup_rx_handlers - Initialize Rx handler callbacks |
1877 | * | 1888 | * |
@@ -1900,18 +1911,21 @@ static void iwl4965_setup_rx_handlers(struct iwl_priv *priv) | |||
1900 | */ | 1911 | */ |
1901 | priv->rx_handlers[REPLY_STATISTICS_CMD] = iwl4965_hw_rx_statistics; | 1912 | priv->rx_handlers[REPLY_STATISTICS_CMD] = iwl4965_hw_rx_statistics; |
1902 | priv->rx_handlers[STATISTICS_NOTIFICATION] = iwl4965_hw_rx_statistics; | 1913 | priv->rx_handlers[STATISTICS_NOTIFICATION] = iwl4965_hw_rx_statistics; |
1903 | 1914 | /* scan handlers */ | |
1904 | priv->rx_handlers[REPLY_SCAN_CMD] = iwl4965_rx_reply_scan; | 1915 | priv->rx_handlers[REPLY_SCAN_CMD] = iwl4965_rx_reply_scan; |
1905 | priv->rx_handlers[SCAN_START_NOTIFICATION] = iwl4965_rx_scan_start_notif; | 1916 | priv->rx_handlers[SCAN_START_NOTIFICATION] = iwl4965_rx_scan_start_notif; |
1906 | priv->rx_handlers[SCAN_RESULTS_NOTIFICATION] = | 1917 | priv->rx_handlers[SCAN_RESULTS_NOTIFICATION] = |
1907 | iwl4965_rx_scan_results_notif; | 1918 | iwl4965_rx_scan_results_notif; |
1908 | priv->rx_handlers[SCAN_COMPLETE_NOTIFICATION] = | 1919 | priv->rx_handlers[SCAN_COMPLETE_NOTIFICATION] = |
1909 | iwl4965_rx_scan_complete_notif; | 1920 | iwl4965_rx_scan_complete_notif; |
1921 | /* status change handler */ | ||
1910 | priv->rx_handlers[CARD_STATE_NOTIFICATION] = iwl4965_rx_card_state_notif; | 1922 | priv->rx_handlers[CARD_STATE_NOTIFICATION] = iwl4965_rx_card_state_notif; |
1911 | 1923 | ||
1912 | priv->rx_handlers[MISSED_BEACONS_NOTIFICATION] = | 1924 | priv->rx_handlers[MISSED_BEACONS_NOTIFICATION] = |
1913 | iwl_rx_missed_beacon_notif; | 1925 | iwl_rx_missed_beacon_notif; |
1914 | 1926 | /* Rx handlers */ | |
1927 | priv->rx_handlers[REPLY_RX_PHY_CMD] = iwl4965_rx_reply_rx_phy; | ||
1928 | priv->rx_handlers[REPLY_RX_MPDU_CMD] = iwl4965_rx_reply_rx; | ||
1915 | /* Set up hardware specific Rx handlers */ | 1929 | /* Set up hardware specific Rx handlers */ |
1916 | priv->cfg->ops->lib->rx_handler_setup(priv); | 1930 | priv->cfg->ops->lib->rx_handler_setup(priv); |
1917 | } | 1931 | } |