diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 176e5257767..d39f449a9bb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include "iwl-led.h" | 51 | #include "iwl-led.h" |
52 | #include "iwl-3945-led.h" | 52 | #include "iwl-3945-led.h" |
53 | #include "iwl-3945-debugfs.h" | 53 | #include "iwl-3945-debugfs.h" |
54 | #include "iwl-legacy.h" | ||
54 | 55 | ||
55 | #define IWL_DECLARE_RATE_INFO(r, ip, in, rp, rn, pp, np) \ | 56 | #define IWL_DECLARE_RATE_INFO(r, ip, in, rp, rn, pp, np) \ |
56 | [IWL_RATE_##r##M_INDEX] = { IWL_RATE_##r##M_PLCP, \ | 57 | [IWL_RATE_##r##M_INDEX] = { IWL_RATE_##r##M_PLCP, \ |
@@ -115,7 +116,7 @@ void iwl3945_disable_events(struct iwl_priv *priv) | |||
115 | u32 base; /* SRAM address of event log header */ | 116 | u32 base; /* SRAM address of event log header */ |
116 | u32 disable_ptr; /* SRAM address of event-disable bitmap array */ | 117 | u32 disable_ptr; /* SRAM address of event-disable bitmap array */ |
117 | u32 array_size; /* # of u32 entries in array */ | 118 | u32 array_size; /* # of u32 entries in array */ |
118 | u32 evt_disable[IWL_EVT_DISABLE_SIZE] = { | 119 | static const u32 evt_disable[IWL_EVT_DISABLE_SIZE] = { |
119 | 0x00000000, /* 31 - 0 Event id numbers */ | 120 | 0x00000000, /* 31 - 0 Event id numbers */ |
120 | 0x00000000, /* 63 - 32 */ | 121 | 0x00000000, /* 63 - 32 */ |
121 | 0x00000000, /* 95 - 64 */ | 122 | 0x00000000, /* 95 - 64 */ |
@@ -296,7 +297,7 @@ static void iwl3945_tx_queue_reclaim(struct iwl_priv *priv, | |||
296 | if (iwl_queue_space(q) > q->low_mark && (txq_id >= 0) && | 297 | if (iwl_queue_space(q) > q->low_mark && (txq_id >= 0) && |
297 | (txq_id != IWL39_CMD_QUEUE_NUM) && | 298 | (txq_id != IWL39_CMD_QUEUE_NUM) && |
298 | priv->mac80211_registered) | 299 | priv->mac80211_registered) |
299 | iwl_wake_queue(priv, txq_id); | 300 | iwl_wake_queue(priv, txq); |
300 | } | 301 | } |
301 | 302 | ||
302 | /** | 303 | /** |
@@ -1451,6 +1452,10 @@ static int iwl3945_send_tx_power(struct iwl_priv *priv) | |||
1451 | }; | 1452 | }; |
1452 | u16 chan; | 1453 | u16 chan; |
1453 | 1454 | ||
1455 | if (WARN_ONCE(test_bit(STATUS_SCAN_HW, &priv->status), | ||
1456 | "TX Power requested while scanning!\n")) | ||
1457 | return -EAGAIN; | ||
1458 | |||
1454 | chan = le16_to_cpu(priv->contexts[IWL_RXON_CTX_BSS].active.channel); | 1459 | chan = le16_to_cpu(priv->contexts[IWL_RXON_CTX_BSS].active.channel); |
1455 | 1460 | ||
1456 | txpower.band = (priv->band == IEEE80211_BAND_5GHZ) ? 0 : 1; | 1461 | txpower.band = (priv->band == IEEE80211_BAND_5GHZ) ? 0 : 1; |
@@ -2722,10 +2727,9 @@ static struct iwl_lib_ops iwl3945_lib = { | |||
2722 | }, | 2727 | }, |
2723 | .send_tx_power = iwl3945_send_tx_power, | 2728 | .send_tx_power = iwl3945_send_tx_power, |
2724 | .is_valid_rtc_data_addr = iwl3945_hw_valid_rtc_data_addr, | 2729 | .is_valid_rtc_data_addr = iwl3945_hw_valid_rtc_data_addr, |
2725 | .post_associate = iwl3945_post_associate, | 2730 | .isr_ops = { |
2726 | .isr = iwl_isr_legacy, | 2731 | .isr = iwl_isr_legacy, |
2727 | .config_ap = iwl3945_config_ap, | 2732 | }, |
2728 | .manage_ibss_station = iwl3945_manage_ibss_station, | ||
2729 | .recover_from_tx_stall = iwl_bg_monitor_recover, | 2733 | .recover_from_tx_stall = iwl_bg_monitor_recover, |
2730 | .check_plcp_health = iwl3945_good_plcp_health, | 2734 | .check_plcp_health = iwl3945_good_plcp_health, |
2731 | 2735 | ||
@@ -2736,10 +2740,16 @@ static struct iwl_lib_ops iwl3945_lib = { | |||
2736 | }, | 2740 | }, |
2737 | }; | 2741 | }; |
2738 | 2742 | ||
2743 | static const struct iwl_legacy_ops iwl3945_legacy_ops = { | ||
2744 | .post_associate = iwl3945_post_associate, | ||
2745 | .config_ap = iwl3945_config_ap, | ||
2746 | .manage_ibss_station = iwl3945_manage_ibss_station, | ||
2747 | }; | ||
2748 | |||
2739 | static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = { | 2749 | static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = { |
2740 | .get_hcmd_size = iwl3945_get_hcmd_size, | 2750 | .get_hcmd_size = iwl3945_get_hcmd_size, |
2741 | .build_addsta_hcmd = iwl3945_build_addsta_hcmd, | 2751 | .build_addsta_hcmd = iwl3945_build_addsta_hcmd, |
2742 | .tx_cmd_protection = iwlcore_tx_cmd_protection, | 2752 | .tx_cmd_protection = iwl_legacy_tx_cmd_protection, |
2743 | .request_scan = iwl3945_request_scan, | 2753 | .request_scan = iwl3945_request_scan, |
2744 | .post_scan = iwl3945_post_scan, | 2754 | .post_scan = iwl3945_post_scan, |
2745 | }; | 2755 | }; |
@@ -2749,6 +2759,8 @@ static const struct iwl_ops iwl3945_ops = { | |||
2749 | .hcmd = &iwl3945_hcmd, | 2759 | .hcmd = &iwl3945_hcmd, |
2750 | .utils = &iwl3945_hcmd_utils, | 2760 | .utils = &iwl3945_hcmd_utils, |
2751 | .led = &iwl3945_led_ops, | 2761 | .led = &iwl3945_led_ops, |
2762 | .legacy = &iwl3945_legacy_ops, | ||
2763 | .ieee80211_ops = &iwl3945_hw_ops, | ||
2752 | }; | 2764 | }; |
2753 | 2765 | ||
2754 | static struct iwl_base_params iwl3945_base_params = { | 2766 | static struct iwl_base_params iwl3945_base_params = { |
@@ -2776,6 +2788,7 @@ static struct iwl_cfg iwl3945_bg_cfg = { | |||
2776 | .ops = &iwl3945_ops, | 2788 | .ops = &iwl3945_ops, |
2777 | .mod_params = &iwl3945_mod_params, | 2789 | .mod_params = &iwl3945_mod_params, |
2778 | .base_params = &iwl3945_base_params, | 2790 | .base_params = &iwl3945_base_params, |
2791 | .led_mode = IWL_LED_BLINK, | ||
2779 | }; | 2792 | }; |
2780 | 2793 | ||
2781 | static struct iwl_cfg iwl3945_abg_cfg = { | 2794 | static struct iwl_cfg iwl3945_abg_cfg = { |
@@ -2788,6 +2801,7 @@ static struct iwl_cfg iwl3945_abg_cfg = { | |||
2788 | .ops = &iwl3945_ops, | 2801 | .ops = &iwl3945_ops, |
2789 | .mod_params = &iwl3945_mod_params, | 2802 | .mod_params = &iwl3945_mod_params, |
2790 | .base_params = &iwl3945_base_params, | 2803 | .base_params = &iwl3945_base_params, |
2804 | .led_mode = IWL_LED_BLINK, | ||
2791 | }; | 2805 | }; |
2792 | 2806 | ||
2793 | DEFINE_PCI_DEVICE_TABLE(iwl3945_hw_card_ids) = { | 2807 | DEFINE_PCI_DEVICE_TABLE(iwl3945_hw_card_ids) = { |