diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 256 |
1 files changed, 218 insertions, 38 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 1c9866daf815..344e99de4cab 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -657,6 +657,131 @@ static void iwl_bg_statistics_periodic(unsigned long data) | |||
657 | iwl_send_statistics_request(priv, CMD_ASYNC, false); | 657 | iwl_send_statistics_request(priv, CMD_ASYNC, false); |
658 | } | 658 | } |
659 | 659 | ||
660 | |||
661 | static void iwl_print_cont_event_trace(struct iwl_priv *priv, u32 base, | ||
662 | u32 start_idx, u32 num_events, | ||
663 | u32 mode) | ||
664 | { | ||
665 | u32 i; | ||
666 | u32 ptr; /* SRAM byte address of log data */ | ||
667 | u32 ev, time, data; /* event log data */ | ||
668 | unsigned long reg_flags; | ||
669 | |||
670 | if (mode == 0) | ||
671 | ptr = base + (4 * sizeof(u32)) + (start_idx * 2 * sizeof(u32)); | ||
672 | else | ||
673 | ptr = base + (4 * sizeof(u32)) + (start_idx * 3 * sizeof(u32)); | ||
674 | |||
675 | /* Make sure device is powered up for SRAM reads */ | ||
676 | spin_lock_irqsave(&priv->reg_lock, reg_flags); | ||
677 | if (iwl_grab_nic_access(priv)) { | ||
678 | spin_unlock_irqrestore(&priv->reg_lock, reg_flags); | ||
679 | return; | ||
680 | } | ||
681 | |||
682 | /* Set starting address; reads will auto-increment */ | ||
683 | _iwl_write_direct32(priv, HBUS_TARG_MEM_RADDR, ptr); | ||
684 | rmb(); | ||
685 | |||
686 | /* | ||
687 | * "time" is actually "data" for mode 0 (no timestamp). | ||
688 | * place event id # at far right for easier visual parsing. | ||
689 | */ | ||
690 | for (i = 0; i < num_events; i++) { | ||
691 | ev = _iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT); | ||
692 | time = _iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT); | ||
693 | if (mode == 0) { | ||
694 | trace_iwlwifi_dev_ucode_cont_event(priv, | ||
695 | 0, time, ev); | ||
696 | } else { | ||
697 | data = _iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT); | ||
698 | trace_iwlwifi_dev_ucode_cont_event(priv, | ||
699 | time, data, ev); | ||
700 | } | ||
701 | } | ||
702 | /* Allow device to power down */ | ||
703 | iwl_release_nic_access(priv); | ||
704 | spin_unlock_irqrestore(&priv->reg_lock, reg_flags); | ||
705 | } | ||
706 | |||
707 | void iwl_continuous_event_trace(struct iwl_priv *priv) | ||
708 | { | ||
709 | u32 capacity; /* event log capacity in # entries */ | ||
710 | u32 base; /* SRAM byte address of event log header */ | ||
711 | u32 mode; /* 0 - no timestamp, 1 - timestamp recorded */ | ||
712 | u32 num_wraps; /* # times uCode wrapped to top of log */ | ||
713 | u32 next_entry; /* index of next entry to be written by uCode */ | ||
714 | |||
715 | if (priv->ucode_type == UCODE_INIT) | ||
716 | base = le32_to_cpu(priv->card_alive_init.error_event_table_ptr); | ||
717 | else | ||
718 | base = le32_to_cpu(priv->card_alive.log_event_table_ptr); | ||
719 | if (priv->cfg->ops->lib->is_valid_rtc_data_addr(base)) { | ||
720 | capacity = iwl_read_targ_mem(priv, base); | ||
721 | num_wraps = iwl_read_targ_mem(priv, base + (2 * sizeof(u32))); | ||
722 | mode = iwl_read_targ_mem(priv, base + (1 * sizeof(u32))); | ||
723 | next_entry = iwl_read_targ_mem(priv, base + (3 * sizeof(u32))); | ||
724 | } else | ||
725 | return; | ||
726 | |||
727 | if (num_wraps == priv->event_log.num_wraps) { | ||
728 | iwl_print_cont_event_trace(priv, | ||
729 | base, priv->event_log.next_entry, | ||
730 | next_entry - priv->event_log.next_entry, | ||
731 | mode); | ||
732 | priv->event_log.non_wraps_count++; | ||
733 | } else { | ||
734 | if ((num_wraps - priv->event_log.num_wraps) > 1) | ||
735 | priv->event_log.wraps_more_count++; | ||
736 | else | ||
737 | priv->event_log.wraps_once_count++; | ||
738 | trace_iwlwifi_dev_ucode_wrap_event(priv, | ||
739 | num_wraps - priv->event_log.num_wraps, | ||
740 | next_entry, priv->event_log.next_entry); | ||
741 | if (next_entry < priv->event_log.next_entry) { | ||
742 | iwl_print_cont_event_trace(priv, base, | ||
743 | priv->event_log.next_entry, | ||
744 | capacity - priv->event_log.next_entry, | ||
745 | mode); | ||
746 | |||
747 | iwl_print_cont_event_trace(priv, base, 0, | ||
748 | next_entry, mode); | ||
749 | } else { | ||
750 | iwl_print_cont_event_trace(priv, base, | ||
751 | next_entry, capacity - next_entry, | ||
752 | mode); | ||
753 | |||
754 | iwl_print_cont_event_trace(priv, base, 0, | ||
755 | next_entry, mode); | ||
756 | } | ||
757 | } | ||
758 | priv->event_log.num_wraps = num_wraps; | ||
759 | priv->event_log.next_entry = next_entry; | ||
760 | } | ||
761 | |||
762 | /** | ||
763 | * iwl_bg_ucode_trace - Timer callback to log ucode event | ||
764 | * | ||
765 | * The timer is continually set to execute every | ||
766 | * UCODE_TRACE_PERIOD milliseconds after the last timer expired | ||
767 | * this function is to perform continuous uCode event logging operation | ||
768 | * if enabled | ||
769 | */ | ||
770 | static void iwl_bg_ucode_trace(unsigned long data) | ||
771 | { | ||
772 | struct iwl_priv *priv = (struct iwl_priv *)data; | ||
773 | |||
774 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | ||
775 | return; | ||
776 | |||
777 | if (priv->event_log.ucode_trace) { | ||
778 | iwl_continuous_event_trace(priv); | ||
779 | /* Reschedule the timer to occur in UCODE_TRACE_PERIOD */ | ||
780 | mod_timer(&priv->ucode_trace, | ||
781 | jiffies + msecs_to_jiffies(UCODE_TRACE_PERIOD)); | ||
782 | } | ||
783 | } | ||
784 | |||
660 | static void iwl_rx_beacon_notif(struct iwl_priv *priv, | 785 | static void iwl_rx_beacon_notif(struct iwl_priv *priv, |
661 | struct iwl_rx_mem_buffer *rxb) | 786 | struct iwl_rx_mem_buffer *rxb) |
662 | { | 787 | { |
@@ -689,12 +814,14 @@ static void iwl_rx_card_state_notif(struct iwl_priv *priv, | |||
689 | u32 flags = le32_to_cpu(pkt->u.card_state_notif.flags); | 814 | u32 flags = le32_to_cpu(pkt->u.card_state_notif.flags); |
690 | unsigned long status = priv->status; | 815 | unsigned long status = priv->status; |
691 | 816 | ||
692 | IWL_DEBUG_RF_KILL(priv, "Card state received: HW:%s SW:%s\n", | 817 | IWL_DEBUG_RF_KILL(priv, "Card state received: HW:%s SW:%s CT:%s\n", |
693 | (flags & HW_CARD_DISABLED) ? "Kill" : "On", | 818 | (flags & HW_CARD_DISABLED) ? "Kill" : "On", |
694 | (flags & SW_CARD_DISABLED) ? "Kill" : "On"); | 819 | (flags & SW_CARD_DISABLED) ? "Kill" : "On", |
820 | (flags & CT_CARD_DISABLED) ? | ||
821 | "Reached" : "Not reached"); | ||
695 | 822 | ||
696 | if (flags & (SW_CARD_DISABLED | HW_CARD_DISABLED | | 823 | if (flags & (SW_CARD_DISABLED | HW_CARD_DISABLED | |
697 | RF_CARD_DISABLED)) { | 824 | CT_CARD_DISABLED)) { |
698 | 825 | ||
699 | iwl_write32(priv, CSR_UCODE_DRV_GP1_SET, | 826 | iwl_write32(priv, CSR_UCODE_DRV_GP1_SET, |
700 | CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED); | 827 | CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED); |
@@ -708,10 +835,10 @@ static void iwl_rx_card_state_notif(struct iwl_priv *priv, | |||
708 | iwl_write_direct32(priv, HBUS_TARG_MBX_C, | 835 | iwl_write_direct32(priv, HBUS_TARG_MBX_C, |
709 | HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED); | 836 | HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED); |
710 | } | 837 | } |
711 | if (flags & RF_CARD_DISABLED) | 838 | if (flags & CT_CARD_DISABLED) |
712 | iwl_tt_enter_ct_kill(priv); | 839 | iwl_tt_enter_ct_kill(priv); |
713 | } | 840 | } |
714 | if (!(flags & RF_CARD_DISABLED)) | 841 | if (!(flags & CT_CARD_DISABLED)) |
715 | iwl_tt_exit_ct_kill(priv); | 842 | iwl_tt_exit_ct_kill(priv); |
716 | 843 | ||
717 | if (flags & HW_CARD_DISABLED) | 844 | if (flags & HW_CARD_DISABLED) |
@@ -1705,8 +1832,9 @@ void iwl_dump_nic_error_log(struct iwl_priv *priv) | |||
1705 | * iwl_print_event_log - Dump error event log to syslog | 1832 | * iwl_print_event_log - Dump error event log to syslog |
1706 | * | 1833 | * |
1707 | */ | 1834 | */ |
1708 | static void iwl_print_event_log(struct iwl_priv *priv, u32 start_idx, | 1835 | static int iwl_print_event_log(struct iwl_priv *priv, u32 start_idx, |
1709 | u32 num_events, u32 mode) | 1836 | u32 num_events, u32 mode, |
1837 | int pos, char **buf, size_t bufsz) | ||
1710 | { | 1838 | { |
1711 | u32 i; | 1839 | u32 i; |
1712 | u32 base; /* SRAM byte address of event log header */ | 1840 | u32 base; /* SRAM byte address of event log header */ |
@@ -1716,7 +1844,7 @@ static void iwl_print_event_log(struct iwl_priv *priv, u32 start_idx, | |||
1716 | unsigned long reg_flags; | 1844 | unsigned long reg_flags; |
1717 | 1845 | ||
1718 | if (num_events == 0) | 1846 | if (num_events == 0) |
1719 | return; | 1847 | return pos; |
1720 | if (priv->ucode_type == UCODE_INIT) | 1848 | if (priv->ucode_type == UCODE_INIT) |
1721 | base = le32_to_cpu(priv->card_alive_init.log_event_table_ptr); | 1849 | base = le32_to_cpu(priv->card_alive_init.log_event_table_ptr); |
1722 | else | 1850 | else |
@@ -1744,27 +1872,44 @@ static void iwl_print_event_log(struct iwl_priv *priv, u32 start_idx, | |||
1744 | time = _iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT); | 1872 | time = _iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT); |
1745 | if (mode == 0) { | 1873 | if (mode == 0) { |
1746 | /* data, ev */ | 1874 | /* data, ev */ |
1747 | trace_iwlwifi_dev_ucode_event(priv, 0, time, ev); | 1875 | if (bufsz) { |
1748 | IWL_ERR(priv, "EVT_LOG:0x%08x:%04u\n", time, ev); | 1876 | pos += scnprintf(*buf + pos, bufsz - pos, |
1877 | "EVT_LOG:0x%08x:%04u\n", | ||
1878 | time, ev); | ||
1879 | } else { | ||
1880 | trace_iwlwifi_dev_ucode_event(priv, 0, | ||
1881 | time, ev); | ||
1882 | IWL_ERR(priv, "EVT_LOG:0x%08x:%04u\n", | ||
1883 | time, ev); | ||
1884 | } | ||
1749 | } else { | 1885 | } else { |
1750 | data = _iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT); | 1886 | data = _iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT); |
1751 | IWL_ERR(priv, "EVT_LOGT:%010u:0x%08x:%04u\n", | 1887 | if (bufsz) { |
1888 | pos += scnprintf(*buf + pos, bufsz - pos, | ||
1889 | "EVT_LOGT:%010u:0x%08x:%04u\n", | ||
1890 | time, data, ev); | ||
1891 | } else { | ||
1892 | IWL_ERR(priv, "EVT_LOGT:%010u:0x%08x:%04u\n", | ||
1752 | time, data, ev); | 1893 | time, data, ev); |
1753 | trace_iwlwifi_dev_ucode_event(priv, time, data, ev); | 1894 | trace_iwlwifi_dev_ucode_event(priv, time, |
1895 | data, ev); | ||
1896 | } | ||
1754 | } | 1897 | } |
1755 | } | 1898 | } |
1756 | 1899 | ||
1757 | /* Allow device to power down */ | 1900 | /* Allow device to power down */ |
1758 | iwl_release_nic_access(priv); | 1901 | iwl_release_nic_access(priv); |
1759 | spin_unlock_irqrestore(&priv->reg_lock, reg_flags); | 1902 | spin_unlock_irqrestore(&priv->reg_lock, reg_flags); |
1903 | return pos; | ||
1760 | } | 1904 | } |
1761 | 1905 | ||
1762 | /** | 1906 | /** |
1763 | * iwl_print_last_event_logs - Dump the newest # of event log to syslog | 1907 | * iwl_print_last_event_logs - Dump the newest # of event log to syslog |
1764 | */ | 1908 | */ |
1765 | static void iwl_print_last_event_logs(struct iwl_priv *priv, u32 capacity, | 1909 | static int iwl_print_last_event_logs(struct iwl_priv *priv, u32 capacity, |
1766 | u32 num_wraps, u32 next_entry, | 1910 | u32 num_wraps, u32 next_entry, |
1767 | u32 size, u32 mode) | 1911 | u32 size, u32 mode, |
1912 | int pos, char **buf, size_t bufsz) | ||
1768 | { | 1913 | { |
1769 | /* | 1914 | /* |
1770 | * display the newest DEFAULT_LOG_ENTRIES entries | 1915 | * display the newest DEFAULT_LOG_ENTRIES entries |
@@ -1772,21 +1917,26 @@ static void iwl_print_last_event_logs(struct iwl_priv *priv, u32 capacity, | |||
1772 | */ | 1917 | */ |
1773 | if (num_wraps) { | 1918 | if (num_wraps) { |
1774 | if (next_entry < size) { | 1919 | if (next_entry < size) { |
1775 | iwl_print_event_log(priv, | 1920 | pos = iwl_print_event_log(priv, |
1776 | capacity - (size - next_entry), | 1921 | capacity - (size - next_entry), |
1777 | size - next_entry, mode); | 1922 | size - next_entry, mode, |
1778 | iwl_print_event_log(priv, 0, | 1923 | pos, buf, bufsz); |
1779 | next_entry, mode); | 1924 | pos = iwl_print_event_log(priv, 0, |
1925 | next_entry, mode, | ||
1926 | pos, buf, bufsz); | ||
1780 | } else | 1927 | } else |
1781 | iwl_print_event_log(priv, next_entry - size, | 1928 | pos = iwl_print_event_log(priv, next_entry - size, |
1782 | size, mode); | 1929 | size, mode, pos, buf, bufsz); |
1783 | } else { | 1930 | } else { |
1784 | if (next_entry < size) | 1931 | if (next_entry < size) { |
1785 | iwl_print_event_log(priv, 0, next_entry, mode); | 1932 | pos = iwl_print_event_log(priv, 0, next_entry, |
1786 | else | 1933 | mode, pos, buf, bufsz); |
1787 | iwl_print_event_log(priv, next_entry - size, | 1934 | } else { |
1788 | size, mode); | 1935 | pos = iwl_print_event_log(priv, next_entry - size, |
1936 | size, mode, pos, buf, bufsz); | ||
1937 | } | ||
1789 | } | 1938 | } |
1939 | return pos; | ||
1790 | } | 1940 | } |
1791 | 1941 | ||
1792 | /* For sanity check only. Actual size is determined by uCode, typ. 512 */ | 1942 | /* For sanity check only. Actual size is determined by uCode, typ. 512 */ |
@@ -1794,7 +1944,8 @@ static void iwl_print_last_event_logs(struct iwl_priv *priv, u32 capacity, | |||
1794 | 1944 | ||
1795 | #define DEFAULT_DUMP_EVENT_LOG_ENTRIES (20) | 1945 | #define DEFAULT_DUMP_EVENT_LOG_ENTRIES (20) |
1796 | 1946 | ||
1797 | void iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log) | 1947 | int iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log, |
1948 | char **buf, bool display) | ||
1798 | { | 1949 | { |
1799 | u32 base; /* SRAM byte address of event log header */ | 1950 | u32 base; /* SRAM byte address of event log header */ |
1800 | u32 capacity; /* event log capacity in # entries */ | 1951 | u32 capacity; /* event log capacity in # entries */ |
@@ -1802,6 +1953,8 @@ void iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log) | |||
1802 | u32 num_wraps; /* # times uCode wrapped to top of log */ | 1953 | u32 num_wraps; /* # times uCode wrapped to top of log */ |
1803 | u32 next_entry; /* index of next entry to be written by uCode */ | 1954 | u32 next_entry; /* index of next entry to be written by uCode */ |
1804 | u32 size; /* # entries that we'll print */ | 1955 | u32 size; /* # entries that we'll print */ |
1956 | int pos = 0; | ||
1957 | size_t bufsz = 0; | ||
1805 | 1958 | ||
1806 | if (priv->ucode_type == UCODE_INIT) | 1959 | if (priv->ucode_type == UCODE_INIT) |
1807 | base = le32_to_cpu(priv->card_alive_init.log_event_table_ptr); | 1960 | base = le32_to_cpu(priv->card_alive_init.log_event_table_ptr); |
@@ -1812,7 +1965,7 @@ void iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log) | |||
1812 | IWL_ERR(priv, | 1965 | IWL_ERR(priv, |
1813 | "Invalid event log pointer 0x%08X for %s uCode\n", | 1966 | "Invalid event log pointer 0x%08X for %s uCode\n", |
1814 | base, (priv->ucode_type == UCODE_INIT) ? "Init" : "RT"); | 1967 | base, (priv->ucode_type == UCODE_INIT) ? "Init" : "RT"); |
1815 | return; | 1968 | return pos; |
1816 | } | 1969 | } |
1817 | 1970 | ||
1818 | /* event log header */ | 1971 | /* event log header */ |
@@ -1838,7 +1991,7 @@ void iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log) | |||
1838 | /* bail out if nothing in log */ | 1991 | /* bail out if nothing in log */ |
1839 | if (size == 0) { | 1992 | if (size == 0) { |
1840 | IWL_ERR(priv, "Start IWL Event Log Dump: nothing in log\n"); | 1993 | IWL_ERR(priv, "Start IWL Event Log Dump: nothing in log\n"); |
1841 | return; | 1994 | return pos; |
1842 | } | 1995 | } |
1843 | 1996 | ||
1844 | #ifdef CONFIG_IWLWIFI_DEBUG | 1997 | #ifdef CONFIG_IWLWIFI_DEBUG |
@@ -1853,6 +2006,15 @@ void iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log) | |||
1853 | size); | 2006 | size); |
1854 | 2007 | ||
1855 | #ifdef CONFIG_IWLWIFI_DEBUG | 2008 | #ifdef CONFIG_IWLWIFI_DEBUG |
2009 | if (display) { | ||
2010 | if (full_log) | ||
2011 | bufsz = capacity * 48; | ||
2012 | else | ||
2013 | bufsz = size * 48; | ||
2014 | *buf = kmalloc(bufsz, GFP_KERNEL); | ||
2015 | if (!*buf) | ||
2016 | return pos; | ||
2017 | } | ||
1856 | if ((iwl_get_debug_level(priv) & IWL_DL_FW_ERRORS) || full_log) { | 2018 | if ((iwl_get_debug_level(priv) & IWL_DL_FW_ERRORS) || full_log) { |
1857 | /* | 2019 | /* |
1858 | * if uCode has wrapped back to top of log, | 2020 | * if uCode has wrapped back to top of log, |
@@ -1860,17 +2022,22 @@ void iwl_dump_nic_event_log(struct iwl_priv *priv, bool full_log) | |||
1860 | * i.e the next one that uCode would fill. | 2022 | * i.e the next one that uCode would fill. |
1861 | */ | 2023 | */ |
1862 | if (num_wraps) | 2024 | if (num_wraps) |
1863 | iwl_print_event_log(priv, next_entry, | 2025 | pos = iwl_print_event_log(priv, next_entry, |
1864 | capacity - next_entry, mode); | 2026 | capacity - next_entry, mode, |
2027 | pos, buf, bufsz); | ||
1865 | /* (then/else) start at top of log */ | 2028 | /* (then/else) start at top of log */ |
1866 | iwl_print_event_log(priv, 0, next_entry, mode); | 2029 | pos = iwl_print_event_log(priv, 0, |
2030 | next_entry, mode, pos, buf, bufsz); | ||
1867 | } else | 2031 | } else |
1868 | iwl_print_last_event_logs(priv, capacity, num_wraps, | 2032 | pos = iwl_print_last_event_logs(priv, capacity, num_wraps, |
1869 | next_entry, size, mode); | 2033 | next_entry, size, mode, |
2034 | pos, buf, bufsz); | ||
1870 | #else | 2035 | #else |
1871 | iwl_print_last_event_logs(priv, capacity, num_wraps, | 2036 | pos = iwl_print_last_event_logs(priv, capacity, num_wraps, |
1872 | next_entry, size, mode); | 2037 | next_entry, size, mode, |
2038 | pos, buf, bufsz); | ||
1873 | #endif | 2039 | #endif |
2040 | return pos; | ||
1874 | } | 2041 | } |
1875 | 2042 | ||
1876 | /** | 2043 | /** |
@@ -2456,6 +2623,10 @@ static int iwl_setup_mac(struct iwl_priv *priv) | |||
2456 | hw->flags |= IEEE80211_HW_SUPPORTS_PS | | 2623 | hw->flags |= IEEE80211_HW_SUPPORTS_PS | |
2457 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS; | 2624 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS; |
2458 | 2625 | ||
2626 | if (priv->cfg->sku & IWL_SKU_N) | ||
2627 | hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS | | ||
2628 | IEEE80211_HW_SUPPORTS_STATIC_SMPS; | ||
2629 | |||
2459 | hw->sta_data_size = sizeof(struct iwl_station_priv); | 2630 | hw->sta_data_size = sizeof(struct iwl_station_priv); |
2460 | hw->wiphy->interface_modes = | 2631 | hw->wiphy->interface_modes = |
2461 | BIT(NL80211_IFTYPE_STATION) | | 2632 | BIT(NL80211_IFTYPE_STATION) | |
@@ -2784,6 +2955,9 @@ static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, | |||
2784 | return 0; | 2955 | return 0; |
2785 | else | 2956 | else |
2786 | return ret; | 2957 | return ret; |
2958 | case IEEE80211_AMPDU_TX_OPERATIONAL: | ||
2959 | /* do nothing */ | ||
2960 | return -EOPNOTSUPP; | ||
2787 | default: | 2961 | default: |
2788 | IWL_DEBUG_HT(priv, "unknown\n"); | 2962 | IWL_DEBUG_HT(priv, "unknown\n"); |
2789 | return -EINVAL; | 2963 | return -EINVAL; |
@@ -3126,6 +3300,10 @@ static void iwl_setup_deferred_work(struct iwl_priv *priv) | |||
3126 | priv->statistics_periodic.data = (unsigned long)priv; | 3300 | priv->statistics_periodic.data = (unsigned long)priv; |
3127 | priv->statistics_periodic.function = iwl_bg_statistics_periodic; | 3301 | priv->statistics_periodic.function = iwl_bg_statistics_periodic; |
3128 | 3302 | ||
3303 | init_timer(&priv->ucode_trace); | ||
3304 | priv->ucode_trace.data = (unsigned long)priv; | ||
3305 | priv->ucode_trace.function = iwl_bg_ucode_trace; | ||
3306 | |||
3129 | if (!priv->cfg->use_isr_legacy) | 3307 | if (!priv->cfg->use_isr_legacy) |
3130 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) | 3308 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) |
3131 | iwl_irq_tasklet, (unsigned long)priv); | 3309 | iwl_irq_tasklet, (unsigned long)priv); |
@@ -3144,6 +3322,7 @@ static void iwl_cancel_deferred_work(struct iwl_priv *priv) | |||
3144 | cancel_delayed_work(&priv->alive_start); | 3322 | cancel_delayed_work(&priv->alive_start); |
3145 | cancel_work_sync(&priv->beacon_update); | 3323 | cancel_work_sync(&priv->beacon_update); |
3146 | del_timer_sync(&priv->statistics_periodic); | 3324 | del_timer_sync(&priv->statistics_periodic); |
3325 | del_timer_sync(&priv->ucode_trace); | ||
3147 | } | 3326 | } |
3148 | 3327 | ||
3149 | static void iwl_init_hw_rates(struct iwl_priv *priv, | 3328 | static void iwl_init_hw_rates(struct iwl_priv *priv, |
@@ -3188,6 +3367,7 @@ static int iwl_init_drv(struct iwl_priv *priv) | |||
3188 | priv->band = IEEE80211_BAND_2GHZ; | 3367 | priv->band = IEEE80211_BAND_2GHZ; |
3189 | 3368 | ||
3190 | priv->iw_mode = NL80211_IFTYPE_STATION; | 3369 | priv->iw_mode = NL80211_IFTYPE_STATION; |
3370 | priv->current_ht_config.smps = IEEE80211_SMPS_STATIC; | ||
3191 | 3371 | ||
3192 | /* Choose which receivers/antennas to use */ | 3372 | /* Choose which receivers/antennas to use */ |
3193 | if (priv->cfg->ops->hcmd->set_rxon_chain) | 3373 | if (priv->cfg->ops->hcmd->set_rxon_chain) |
@@ -3589,7 +3769,7 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev) | |||
3589 | *****************************************************************************/ | 3769 | *****************************************************************************/ |
3590 | 3770 | ||
3591 | /* Hardware specific file defines the PCI IDs table for that hardware module */ | 3771 | /* Hardware specific file defines the PCI IDs table for that hardware module */ |
3592 | static struct pci_device_id iwl_hw_card_ids[] = { | 3772 | static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { |
3593 | #ifdef CONFIG_IWL4965 | 3773 | #ifdef CONFIG_IWL4965 |
3594 | {IWL_PCI_DEVICE(0x4229, PCI_ANY_ID, iwl4965_agn_cfg)}, | 3774 | {IWL_PCI_DEVICE(0x4229, PCI_ANY_ID, iwl4965_agn_cfg)}, |
3595 | {IWL_PCI_DEVICE(0x4230, PCI_ANY_ID, iwl4965_agn_cfg)}, | 3775 | {IWL_PCI_DEVICE(0x4230, PCI_ANY_ID, iwl4965_agn_cfg)}, |