aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorAbhijeet Kolekar <abhijeet.kolekar@intel.com>2009-02-18 18:54:29 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-27 14:52:45 -0500
commit261b9c33987ca80bf6217848c3c113d2a4d313d0 (patch)
treea925bd6ecbda4eb3b70ed1809afcfe9e07bfb69e /drivers/net/wireless/iwlwifi/iwl3945-base.c
parent030f05eda6ee4d0ed63a93f4f9ebae42c46fb8b6 (diff)
iwl3945: use iwl_rx_reply_error notification
Patch removes duplicate code from iwl3945 and uses iwl_rx_reply_error and spectrum notifications from iwlwifi. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Acked-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c37
1 files changed, 2 insertions, 35 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index abb9cd39bcda..5c0e0a48e6bf 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1385,38 +1385,6 @@ static void iwl3945_rx_reply_add_sta(struct iwl_priv *priv,
1385 return; 1385 return;
1386} 1386}
1387 1387
1388static void iwl3945_rx_reply_error(struct iwl_priv *priv,
1389 struct iwl_rx_mem_buffer *rxb)
1390{
1391 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
1392
1393 IWL_ERR(priv, "Error Reply type 0x%08X cmd %s (0x%02X) "
1394 "seq 0x%04X ser 0x%08X\n",
1395 le32_to_cpu(pkt->u.err_resp.error_type),
1396 get_cmd_string(pkt->u.err_resp.cmd_id),
1397 pkt->u.err_resp.cmd_id,
1398 le16_to_cpu(pkt->u.err_resp.bad_cmd_seq_num),
1399 le32_to_cpu(pkt->u.err_resp.error_info));
1400}
1401
1402static void iwl3945_rx_spectrum_measure_notif(struct iwl_priv *priv,
1403 struct iwl_rx_mem_buffer *rxb)
1404{
1405#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT
1406 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
1407 struct iwl_spectrum_notification *report = &(pkt->u.spectrum_notif);
1408
1409 if (!report->state) {
1410 IWL_DEBUG(priv, IWL_DL_11H | IWL_DL_INFO,
1411 "Spectrum Measure Notification: Start\n");
1412 return;
1413 }
1414
1415 memcpy(&priv->measure_report, report, sizeof(*report));
1416 priv->measurement_status |= MEASUREMENT_READY;
1417#endif
1418}
1419
1420static void iwl3945_bg_beacon_update(struct work_struct *work) 1388static void iwl3945_bg_beacon_update(struct work_struct *work)
1421{ 1389{
1422 struct iwl_priv *priv = 1390 struct iwl_priv *priv =
@@ -1515,10 +1483,8 @@ static void iwl3945_setup_rx_handlers(struct iwl_priv *priv)
1515{ 1483{
1516 priv->rx_handlers[REPLY_ALIVE] = iwl3945_rx_reply_alive; 1484 priv->rx_handlers[REPLY_ALIVE] = iwl3945_rx_reply_alive;
1517 priv->rx_handlers[REPLY_ADD_STA] = iwl3945_rx_reply_add_sta; 1485 priv->rx_handlers[REPLY_ADD_STA] = iwl3945_rx_reply_add_sta;
1518 priv->rx_handlers[REPLY_ERROR] = iwl3945_rx_reply_error; 1486 priv->rx_handlers[REPLY_ERROR] = iwl_rx_reply_error;
1519 priv->rx_handlers[CHANNEL_SWITCH_NOTIFICATION] = iwl_rx_csa; 1487 priv->rx_handlers[CHANNEL_SWITCH_NOTIFICATION] = iwl_rx_csa;
1520 priv->rx_handlers[SPECTRUM_MEASURE_NOTIFICATION] =
1521 iwl3945_rx_spectrum_measure_notif;
1522 priv->rx_handlers[PM_SLEEP_NOTIFICATION] = iwl_rx_pm_sleep_notif; 1488 priv->rx_handlers[PM_SLEEP_NOTIFICATION] = iwl_rx_pm_sleep_notif;
1523 priv->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] = 1489 priv->rx_handlers[PM_DEBUG_STATISTIC_NOTIFIC] =
1524 iwl_rx_pm_debug_statistics_notif; 1490 iwl_rx_pm_debug_statistics_notif;
@@ -1532,6 +1498,7 @@ static void iwl3945_setup_rx_handlers(struct iwl_priv *priv)
1532 priv->rx_handlers[REPLY_STATISTICS_CMD] = iwl3945_hw_rx_statistics; 1498 priv->rx_handlers[REPLY_STATISTICS_CMD] = iwl3945_hw_rx_statistics;
1533 priv->rx_handlers[STATISTICS_NOTIFICATION] = iwl3945_hw_rx_statistics; 1499 priv->rx_handlers[STATISTICS_NOTIFICATION] = iwl3945_hw_rx_statistics;
1534 1500
1501 iwl_setup_spectrum_handlers(priv);
1535 iwl_setup_rx_scan_handlers(priv); 1502 iwl_setup_rx_scan_handlers(priv);
1536 priv->rx_handlers[CARD_STATE_NOTIFICATION] = iwl3945_rx_card_state_notif; 1503 priv->rx_handlers[CARD_STATE_NOTIFICATION] = iwl3945_rx_card_state_notif;
1537 1504