diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 198 |
1 files changed, 107 insertions, 91 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 8972166386cb..d3afddae8d9f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -46,6 +46,8 @@ | |||
46 | #include "iwl-calib.h" | 46 | #include "iwl-calib.h" |
47 | #include "iwl-sta.h" | 47 | #include "iwl-sta.h" |
48 | #include "iwl-agn-led.h" | 48 | #include "iwl-agn-led.h" |
49 | #include "iwl-agn.h" | ||
50 | #include "iwl-agn-debugfs.h" | ||
49 | 51 | ||
50 | static int iwl4965_send_tx_power(struct iwl_priv *priv); | 52 | static int iwl4965_send_tx_power(struct iwl_priv *priv); |
51 | static int iwl4965_hw_get_temperature(struct iwl_priv *priv); | 53 | static int iwl4965_hw_get_temperature(struct iwl_priv *priv); |
@@ -60,14 +62,6 @@ static int iwl4965_hw_get_temperature(struct iwl_priv *priv); | |||
60 | #define _IWL4965_MODULE_FIRMWARE(api) IWL4965_FW_PRE #api ".ucode" | 62 | #define _IWL4965_MODULE_FIRMWARE(api) IWL4965_FW_PRE #api ".ucode" |
61 | #define IWL4965_MODULE_FIRMWARE(api) _IWL4965_MODULE_FIRMWARE(api) | 63 | #define IWL4965_MODULE_FIRMWARE(api) _IWL4965_MODULE_FIRMWARE(api) |
62 | 64 | ||
63 | |||
64 | /* module parameters */ | ||
65 | static struct iwl_mod_params iwl4965_mod_params = { | ||
66 | .amsdu_size_8K = 1, | ||
67 | .restart_fw = 1, | ||
68 | /* the rest are 0 by default */ | ||
69 | }; | ||
70 | |||
71 | /* check contents of special bootstrap uCode SRAM */ | 65 | /* check contents of special bootstrap uCode SRAM */ |
72 | static int iwl4965_verify_bsm(struct iwl_priv *priv) | 66 | static int iwl4965_verify_bsm(struct iwl_priv *priv) |
73 | { | 67 | { |
@@ -417,7 +411,7 @@ static void iwl4965_gain_computation(struct iwl_priv *priv, | |||
417 | sizeof(cmd), &cmd); | 411 | sizeof(cmd), &cmd); |
418 | if (ret) | 412 | if (ret) |
419 | IWL_DEBUG_CALIB(priv, "fail sending cmd " | 413 | IWL_DEBUG_CALIB(priv, "fail sending cmd " |
420 | "REPLY_PHY_CALIBRATION_CMD \n"); | 414 | "REPLY_PHY_CALIBRATION_CMD\n"); |
421 | 415 | ||
422 | /* TODO we might want recalculate | 416 | /* TODO we might want recalculate |
423 | * rx_chain in rxon cmd */ | 417 | * rx_chain in rxon cmd */ |
@@ -502,14 +496,14 @@ static void iwl4965_tx_queue_set_status(struct iwl_priv *priv, | |||
502 | scd_retry ? "BA" : "AC", txq_id, tx_fifo_id); | 496 | scd_retry ? "BA" : "AC", txq_id, tx_fifo_id); |
503 | } | 497 | } |
504 | 498 | ||
505 | static const u16 default_queue_to_tx_fifo[] = { | 499 | static const s8 default_queue_to_tx_fifo[] = { |
506 | IWL_TX_FIFO_AC3, | 500 | IWL_TX_FIFO_VO, |
507 | IWL_TX_FIFO_AC2, | 501 | IWL_TX_FIFO_VI, |
508 | IWL_TX_FIFO_AC1, | 502 | IWL_TX_FIFO_BE, |
509 | IWL_TX_FIFO_AC0, | 503 | IWL_TX_FIFO_BK, |
510 | IWL49_CMD_FIFO_NUM, | 504 | IWL49_CMD_FIFO_NUM, |
511 | IWL_TX_FIFO_HCCA_1, | 505 | IWL_TX_FIFO_UNUSED, |
512 | IWL_TX_FIFO_HCCA_2 | 506 | IWL_TX_FIFO_UNUSED, |
513 | }; | 507 | }; |
514 | 508 | ||
515 | static int iwl4965_alive_notify(struct iwl_priv *priv) | 509 | static int iwl4965_alive_notify(struct iwl_priv *priv) |
@@ -589,9 +583,15 @@ static int iwl4965_alive_notify(struct iwl_priv *priv) | |||
589 | /* reset to 0 to enable all the queue first */ | 583 | /* reset to 0 to enable all the queue first */ |
590 | priv->txq_ctx_active_msk = 0; | 584 | priv->txq_ctx_active_msk = 0; |
591 | /* Map each Tx/cmd queue to its corresponding fifo */ | 585 | /* Map each Tx/cmd queue to its corresponding fifo */ |
586 | BUILD_BUG_ON(ARRAY_SIZE(default_queue_to_tx_fifo) != 7); | ||
592 | for (i = 0; i < ARRAY_SIZE(default_queue_to_tx_fifo); i++) { | 587 | for (i = 0; i < ARRAY_SIZE(default_queue_to_tx_fifo); i++) { |
593 | int ac = default_queue_to_tx_fifo[i]; | 588 | int ac = default_queue_to_tx_fifo[i]; |
589 | |||
594 | iwl_txq_ctx_activate(priv, i); | 590 | iwl_txq_ctx_activate(priv, i); |
591 | |||
592 | if (ac == IWL_TX_FIFO_UNUSED) | ||
593 | continue; | ||
594 | |||
595 | iwl4965_tx_queue_set_status(priv, &priv->txq[i], ac, 0); | 595 | iwl4965_tx_queue_set_status(priv, &priv->txq[i], ac, 0); |
596 | } | 596 | } |
597 | 597 | ||
@@ -1613,19 +1613,19 @@ static int iwl4965_is_temp_calib_needed(struct iwl_priv *priv) | |||
1613 | 1613 | ||
1614 | /* get absolute value */ | 1614 | /* get absolute value */ |
1615 | if (temp_diff < 0) { | 1615 | if (temp_diff < 0) { |
1616 | IWL_DEBUG_POWER(priv, "Getting cooler, delta %d, \n", temp_diff); | 1616 | IWL_DEBUG_POWER(priv, "Getting cooler, delta %d\n", temp_diff); |
1617 | temp_diff = -temp_diff; | 1617 | temp_diff = -temp_diff; |
1618 | } else if (temp_diff == 0) | 1618 | } else if (temp_diff == 0) |
1619 | IWL_DEBUG_POWER(priv, "Same temp, \n"); | 1619 | IWL_DEBUG_POWER(priv, "Temperature unchanged\n"); |
1620 | else | 1620 | else |
1621 | IWL_DEBUG_POWER(priv, "Getting warmer, delta %d, \n", temp_diff); | 1621 | IWL_DEBUG_POWER(priv, "Getting warmer, delta %d\n", temp_diff); |
1622 | 1622 | ||
1623 | if (temp_diff < IWL_TEMPERATURE_THRESHOLD) { | 1623 | if (temp_diff < IWL_TEMPERATURE_THRESHOLD) { |
1624 | IWL_DEBUG_POWER(priv, "Thermal txpower calib not needed\n"); | 1624 | IWL_DEBUG_POWER(priv, " => thermal txpower calib not needed\n"); |
1625 | return 0; | 1625 | return 0; |
1626 | } | 1626 | } |
1627 | 1627 | ||
1628 | IWL_DEBUG_POWER(priv, "Thermal txpower calib needed\n"); | 1628 | IWL_DEBUG_POWER(priv, " => thermal txpower calib needed\n"); |
1629 | 1629 | ||
1630 | return 1; | 1630 | return 1; |
1631 | } | 1631 | } |
@@ -1874,7 +1874,7 @@ static int iwl4965_tx_status_reply_tx(struct iwl_priv *priv, | |||
1874 | info->status.rates[0].count = tx_resp->failure_frame + 1; | 1874 | info->status.rates[0].count = tx_resp->failure_frame + 1; |
1875 | info->flags &= ~IEEE80211_TX_CTL_AMPDU; | 1875 | info->flags &= ~IEEE80211_TX_CTL_AMPDU; |
1876 | info->flags |= iwl_tx_status_to_mac80211(status); | 1876 | info->flags |= iwl_tx_status_to_mac80211(status); |
1877 | iwl_hwrate_to_tx_control(priv, rate_n_flags, info); | 1877 | iwlagn_hwrate_to_tx_control(priv, rate_n_flags, info); |
1878 | /* FIXME: code repetition end */ | 1878 | /* FIXME: code repetition end */ |
1879 | 1879 | ||
1880 | IWL_DEBUG_TX_REPLY(priv, "1 Frame 0x%x failure :%d\n", | 1880 | IWL_DEBUG_TX_REPLY(priv, "1 Frame 0x%x failure :%d\n", |
@@ -1953,6 +1953,60 @@ static int iwl4965_tx_status_reply_tx(struct iwl_priv *priv, | |||
1953 | return 0; | 1953 | return 0; |
1954 | } | 1954 | } |
1955 | 1955 | ||
1956 | static u8 iwl_find_station(struct iwl_priv *priv, const u8 *addr) | ||
1957 | { | ||
1958 | int i; | ||
1959 | int start = 0; | ||
1960 | int ret = IWL_INVALID_STATION; | ||
1961 | unsigned long flags; | ||
1962 | |||
1963 | if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) || | ||
1964 | (priv->iw_mode == NL80211_IFTYPE_AP)) | ||
1965 | start = IWL_STA_ID; | ||
1966 | |||
1967 | if (is_broadcast_ether_addr(addr)) | ||
1968 | return priv->hw_params.bcast_sta_id; | ||
1969 | |||
1970 | spin_lock_irqsave(&priv->sta_lock, flags); | ||
1971 | for (i = start; i < priv->hw_params.max_stations; i++) | ||
1972 | if (priv->stations[i].used && | ||
1973 | (!compare_ether_addr(priv->stations[i].sta.sta.addr, | ||
1974 | addr))) { | ||
1975 | ret = i; | ||
1976 | goto out; | ||
1977 | } | ||
1978 | |||
1979 | IWL_DEBUG_ASSOC_LIMIT(priv, "can not find STA %pM total %d\n", | ||
1980 | addr, priv->num_stations); | ||
1981 | |||
1982 | out: | ||
1983 | /* | ||
1984 | * It may be possible that more commands interacting with stations | ||
1985 | * arrive before we completed processing the adding of | ||
1986 | * station | ||
1987 | */ | ||
1988 | if (ret != IWL_INVALID_STATION && | ||
1989 | (!(priv->stations[ret].used & IWL_STA_UCODE_ACTIVE) || | ||
1990 | ((priv->stations[ret].used & IWL_STA_UCODE_ACTIVE) && | ||
1991 | (priv->stations[ret].used & IWL_STA_UCODE_INPROGRESS)))) { | ||
1992 | IWL_ERR(priv, "Requested station info for sta %d before ready.\n", | ||
1993 | ret); | ||
1994 | ret = IWL_INVALID_STATION; | ||
1995 | } | ||
1996 | spin_unlock_irqrestore(&priv->sta_lock, flags); | ||
1997 | return ret; | ||
1998 | } | ||
1999 | |||
2000 | static int iwl_get_ra_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) | ||
2001 | { | ||
2002 | if (priv->iw_mode == NL80211_IFTYPE_STATION) { | ||
2003 | return IWL_AP_ID; | ||
2004 | } else { | ||
2005 | u8 *da = ieee80211_get_DA(hdr); | ||
2006 | return iwl_find_station(priv, da); | ||
2007 | } | ||
2008 | } | ||
2009 | |||
1956 | /** | 2010 | /** |
1957 | * iwl4965_rx_reply_tx - Handle standard (non-aggregation) Tx response | 2011 | * iwl4965_rx_reply_tx - Handle standard (non-aggregation) Tx response |
1958 | */ | 2012 | */ |
@@ -2014,7 +2068,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv, | |||
2014 | index = iwl_queue_dec_wrap(scd_ssn & 0xff, txq->q.n_bd); | 2068 | index = iwl_queue_dec_wrap(scd_ssn & 0xff, txq->q.n_bd); |
2015 | IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn " | 2069 | IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn " |
2016 | "%d index %d\n", scd_ssn , index); | 2070 | "%d index %d\n", scd_ssn , index); |
2017 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); | 2071 | freed = iwlagn_tx_queue_reclaim(priv, txq_id, index); |
2018 | if (qc) | 2072 | if (qc) |
2019 | iwl_free_tfds_in_queue(priv, sta_id, | 2073 | iwl_free_tfds_in_queue(priv, sta_id, |
2020 | tid, freed); | 2074 | tid, freed); |
@@ -2031,7 +2085,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv, | |||
2031 | } else { | 2085 | } else { |
2032 | info->status.rates[0].count = tx_resp->failure_frame + 1; | 2086 | info->status.rates[0].count = tx_resp->failure_frame + 1; |
2033 | info->flags |= iwl_tx_status_to_mac80211(status); | 2087 | info->flags |= iwl_tx_status_to_mac80211(status); |
2034 | iwl_hwrate_to_tx_control(priv, | 2088 | iwlagn_hwrate_to_tx_control(priv, |
2035 | le32_to_cpu(tx_resp->rate_n_flags), | 2089 | le32_to_cpu(tx_resp->rate_n_flags), |
2036 | info); | 2090 | info); |
2037 | 2091 | ||
@@ -2042,7 +2096,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv, | |||
2042 | le32_to_cpu(tx_resp->rate_n_flags), | 2096 | le32_to_cpu(tx_resp->rate_n_flags), |
2043 | tx_resp->failure_frame); | 2097 | tx_resp->failure_frame); |
2044 | 2098 | ||
2045 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); | 2099 | freed = iwlagn_tx_queue_reclaim(priv, txq_id, index); |
2046 | if (qc && likely(sta_id != IWL_INVALID_STATION)) | 2100 | if (qc && likely(sta_id != IWL_INVALID_STATION)) |
2047 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); | 2101 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); |
2048 | else if (sta_id == IWL_INVALID_STATION) | 2102 | else if (sta_id == IWL_INVALID_STATION) |
@@ -2053,10 +2107,9 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv, | |||
2053 | iwl_wake_queue(priv, txq_id); | 2107 | iwl_wake_queue(priv, txq_id); |
2054 | } | 2108 | } |
2055 | if (qc && likely(sta_id != IWL_INVALID_STATION)) | 2109 | if (qc && likely(sta_id != IWL_INVALID_STATION)) |
2056 | iwl_txq_check_empty(priv, sta_id, tid, txq_id); | 2110 | iwlagn_txq_check_empty(priv, sta_id, tid, txq_id); |
2057 | 2111 | ||
2058 | if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) | 2112 | iwl_check_abort_status(priv, tx_resp->frame_count, status); |
2059 | IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n"); | ||
2060 | } | 2113 | } |
2061 | 2114 | ||
2062 | static int iwl4965_calc_rssi(struct iwl_priv *priv, | 2115 | static int iwl4965_calc_rssi(struct iwl_priv *priv, |
@@ -2090,7 +2143,7 @@ static int iwl4965_calc_rssi(struct iwl_priv *priv, | |||
2090 | 2143 | ||
2091 | /* dBm = max_rssi dB - agc dB - constant. | 2144 | /* dBm = max_rssi dB - agc dB - constant. |
2092 | * Higher AGC (higher radio gain) means lower signal. */ | 2145 | * Higher AGC (higher radio gain) means lower signal. */ |
2093 | return max_rssi - agc - IWL49_RSSI_OFFSET; | 2146 | return max_rssi - agc - IWLAGN_RSSI_OFFSET; |
2094 | } | 2147 | } |
2095 | 2148 | ||
2096 | 2149 | ||
@@ -2098,7 +2151,7 @@ static int iwl4965_calc_rssi(struct iwl_priv *priv, | |||
2098 | static void iwl4965_rx_handler_setup(struct iwl_priv *priv) | 2151 | static void iwl4965_rx_handler_setup(struct iwl_priv *priv) |
2099 | { | 2152 | { |
2100 | /* Legacy Rx frames */ | 2153 | /* Legacy Rx frames */ |
2101 | priv->rx_handlers[REPLY_RX] = iwl_rx_reply_rx; | 2154 | priv->rx_handlers[REPLY_RX] = iwlagn_rx_reply_rx; |
2102 | /* Tx response */ | 2155 | /* Tx response */ |
2103 | priv->rx_handlers[REPLY_TX] = iwl4965_rx_reply_tx; | 2156 | priv->rx_handlers[REPLY_TX] = iwl4965_rx_reply_tx; |
2104 | } | 2157 | } |
@@ -2113,50 +2166,13 @@ static void iwl4965_cancel_deferred_work(struct iwl_priv *priv) | |||
2113 | cancel_work_sync(&priv->txpower_work); | 2166 | cancel_work_sync(&priv->txpower_work); |
2114 | } | 2167 | } |
2115 | 2168 | ||
2116 | #define IWL4965_UCODE_GET(item) \ | ||
2117 | static u32 iwl4965_ucode_get_##item(const struct iwl_ucode_header *ucode,\ | ||
2118 | u32 api_ver) \ | ||
2119 | { \ | ||
2120 | return le32_to_cpu(ucode->u.v1.item); \ | ||
2121 | } | ||
2122 | |||
2123 | static u32 iwl4965_ucode_get_header_size(u32 api_ver) | ||
2124 | { | ||
2125 | return UCODE_HEADER_SIZE(1); | ||
2126 | } | ||
2127 | static u32 iwl4965_ucode_get_build(const struct iwl_ucode_header *ucode, | ||
2128 | u32 api_ver) | ||
2129 | { | ||
2130 | return 0; | ||
2131 | } | ||
2132 | static u8 *iwl4965_ucode_get_data(const struct iwl_ucode_header *ucode, | ||
2133 | u32 api_ver) | ||
2134 | { | ||
2135 | return (u8 *) ucode->u.v1.data; | ||
2136 | } | ||
2137 | |||
2138 | IWL4965_UCODE_GET(inst_size); | ||
2139 | IWL4965_UCODE_GET(data_size); | ||
2140 | IWL4965_UCODE_GET(init_size); | ||
2141 | IWL4965_UCODE_GET(init_data_size); | ||
2142 | IWL4965_UCODE_GET(boot_size); | ||
2143 | |||
2144 | static struct iwl_hcmd_ops iwl4965_hcmd = { | 2169 | static struct iwl_hcmd_ops iwl4965_hcmd = { |
2145 | .rxon_assoc = iwl4965_send_rxon_assoc, | 2170 | .rxon_assoc = iwl4965_send_rxon_assoc, |
2146 | .commit_rxon = iwl_commit_rxon, | 2171 | .commit_rxon = iwl_commit_rxon, |
2147 | .set_rxon_chain = iwl_set_rxon_chain, | 2172 | .set_rxon_chain = iwl_set_rxon_chain, |
2173 | .send_bt_config = iwl_send_bt_config, | ||
2148 | }; | 2174 | }; |
2149 | 2175 | ||
2150 | static struct iwl_ucode_ops iwl4965_ucode = { | ||
2151 | .get_header_size = iwl4965_ucode_get_header_size, | ||
2152 | .get_build = iwl4965_ucode_get_build, | ||
2153 | .get_inst_size = iwl4965_ucode_get_inst_size, | ||
2154 | .get_data_size = iwl4965_ucode_get_data_size, | ||
2155 | .get_init_size = iwl4965_ucode_get_init_size, | ||
2156 | .get_init_data_size = iwl4965_ucode_get_init_data_size, | ||
2157 | .get_boot_size = iwl4965_ucode_get_boot_size, | ||
2158 | .get_data = iwl4965_ucode_get_data, | ||
2159 | }; | ||
2160 | static struct iwl_hcmd_utils_ops iwl4965_hcmd_utils = { | 2176 | static struct iwl_hcmd_utils_ops iwl4965_hcmd_utils = { |
2161 | .get_hcmd_size = iwl4965_get_hcmd_size, | 2177 | .get_hcmd_size = iwl4965_get_hcmd_size, |
2162 | .build_addsta_hcmd = iwl4965_build_addsta_hcmd, | 2178 | .build_addsta_hcmd = iwl4965_build_addsta_hcmd, |
@@ -2164,6 +2180,7 @@ static struct iwl_hcmd_utils_ops iwl4965_hcmd_utils = { | |||
2164 | .gain_computation = iwl4965_gain_computation, | 2180 | .gain_computation = iwl4965_gain_computation, |
2165 | .rts_tx_cmd_flag = iwlcore_rts_tx_cmd_flag, | 2181 | .rts_tx_cmd_flag = iwlcore_rts_tx_cmd_flag, |
2166 | .calc_rssi = iwl4965_calc_rssi, | 2182 | .calc_rssi = iwl4965_calc_rssi, |
2183 | .request_scan = iwlagn_request_scan, | ||
2167 | }; | 2184 | }; |
2168 | 2185 | ||
2169 | static struct iwl_lib_ops iwl4965_lib = { | 2186 | static struct iwl_lib_ops iwl4965_lib = { |
@@ -2184,6 +2201,7 @@ static struct iwl_lib_ops iwl4965_lib = { | |||
2184 | .load_ucode = iwl4965_load_bsm, | 2201 | .load_ucode = iwl4965_load_bsm, |
2185 | .dump_nic_event_log = iwl_dump_nic_event_log, | 2202 | .dump_nic_event_log = iwl_dump_nic_event_log, |
2186 | .dump_nic_error_log = iwl_dump_nic_error_log, | 2203 | .dump_nic_error_log = iwl_dump_nic_error_log, |
2204 | .dump_fh = iwl_dump_fh, | ||
2187 | .set_channel_switch = iwl4965_hw_channel_switch, | 2205 | .set_channel_switch = iwl4965_hw_channel_switch, |
2188 | .apm_ops = { | 2206 | .apm_ops = { |
2189 | .init = iwl_apm_init, | 2207 | .init = iwl_apm_init, |
@@ -2216,11 +2234,16 @@ static struct iwl_lib_ops iwl4965_lib = { | |||
2216 | .temperature = iwl4965_temperature_calib, | 2234 | .temperature = iwl4965_temperature_calib, |
2217 | .set_ct_kill = iwl4965_set_ct_threshold, | 2235 | .set_ct_kill = iwl4965_set_ct_threshold, |
2218 | }, | 2236 | }, |
2219 | .add_bcast_station = iwl_add_bcast_station, | 2237 | .manage_ibss_station = iwlagn_manage_ibss_station, |
2238 | .debugfs_ops = { | ||
2239 | .rx_stats_read = iwl_ucode_rx_stats_read, | ||
2240 | .tx_stats_read = iwl_ucode_tx_stats_read, | ||
2241 | .general_stats_read = iwl_ucode_general_stats_read, | ||
2242 | }, | ||
2243 | .check_plcp_health = iwl_good_plcp_health, | ||
2220 | }; | 2244 | }; |
2221 | 2245 | ||
2222 | static const struct iwl_ops iwl4965_ops = { | 2246 | static const struct iwl_ops iwl4965_ops = { |
2223 | .ucode = &iwl4965_ucode, | ||
2224 | .lib = &iwl4965_lib, | 2247 | .lib = &iwl4965_lib, |
2225 | .hcmd = &iwl4965_hcmd, | 2248 | .hcmd = &iwl4965_hcmd, |
2226 | .utils = &iwl4965_hcmd_utils, | 2249 | .utils = &iwl4965_hcmd_utils, |
@@ -2228,7 +2251,7 @@ static const struct iwl_ops iwl4965_ops = { | |||
2228 | }; | 2251 | }; |
2229 | 2252 | ||
2230 | struct iwl_cfg iwl4965_agn_cfg = { | 2253 | struct iwl_cfg iwl4965_agn_cfg = { |
2231 | .name = "4965AGN", | 2254 | .name = "Intel(R) Wireless WiFi Link 4965AGN", |
2232 | .fw_name_pre = IWL4965_FW_PRE, | 2255 | .fw_name_pre = IWL4965_FW_PRE, |
2233 | .ucode_api_max = IWL4965_UCODE_API_MAX, | 2256 | .ucode_api_max = IWL4965_UCODE_API_MAX, |
2234 | .ucode_api_min = IWL4965_UCODE_API_MIN, | 2257 | .ucode_api_min = IWL4965_UCODE_API_MIN, |
@@ -2239,7 +2262,7 @@ struct iwl_cfg iwl4965_agn_cfg = { | |||
2239 | .ops = &iwl4965_ops, | 2262 | .ops = &iwl4965_ops, |
2240 | .num_of_queues = IWL49_NUM_QUEUES, | 2263 | .num_of_queues = IWL49_NUM_QUEUES, |
2241 | .num_of_ampdu_queues = IWL49_NUM_AMPDU_QUEUES, | 2264 | .num_of_ampdu_queues = IWL49_NUM_AMPDU_QUEUES, |
2242 | .mod_params = &iwl4965_mod_params, | 2265 | .mod_params = &iwlagn_mod_params, |
2243 | .valid_tx_ant = ANT_AB, | 2266 | .valid_tx_ant = ANT_AB, |
2244 | .valid_rx_ant = ANT_ABC, | 2267 | .valid_rx_ant = ANT_ABC, |
2245 | .pll_cfg_val = 0, | 2268 | .pll_cfg_val = 0, |
@@ -2251,27 +2274,20 @@ struct iwl_cfg iwl4965_agn_cfg = { | |||
2251 | .led_compensation = 61, | 2274 | .led_compensation = 61, |
2252 | .chain_noise_num_beacons = IWL4965_CAL_NUM_BEACONS, | 2275 | .chain_noise_num_beacons = IWL4965_CAL_NUM_BEACONS, |
2253 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | 2276 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
2277 | .monitor_recover_period = IWL_MONITORING_PERIOD, | ||
2278 | .temperature_kelvin = true, | ||
2279 | .max_event_log_size = 512, | ||
2280 | .tx_power_by_driver = true, | ||
2281 | .ucode_tracing = true, | ||
2282 | .sensitivity_calib_by_driver = true, | ||
2283 | .chain_noise_calib_by_driver = true, | ||
2284 | /* | ||
2285 | * Force use of chains B and C for scan RX on 5 GHz band | ||
2286 | * because the device has off-channel reception on chain A. | ||
2287 | */ | ||
2288 | .scan_antennas[IEEE80211_BAND_5GHZ] = ANT_BC, | ||
2254 | }; | 2289 | }; |
2255 | 2290 | ||
2256 | /* Module firmware */ | 2291 | /* Module firmware */ |
2257 | MODULE_FIRMWARE(IWL4965_MODULE_FIRMWARE(IWL4965_UCODE_API_MAX)); | 2292 | MODULE_FIRMWARE(IWL4965_MODULE_FIRMWARE(IWL4965_UCODE_API_MAX)); |
2258 | 2293 | ||
2259 | module_param_named(antenna, iwl4965_mod_params.antenna, int, S_IRUGO); | ||
2260 | MODULE_PARM_DESC(antenna, "select antenna (1=Main, 2=Aux, default 0 [both])"); | ||
2261 | module_param_named(swcrypto, iwl4965_mod_params.sw_crypto, int, S_IRUGO); | ||
2262 | MODULE_PARM_DESC(swcrypto, "using crypto in software (default 0 [hardware])"); | ||
2263 | module_param_named( | ||
2264 | disable_hw_scan, iwl4965_mod_params.disable_hw_scan, int, S_IRUGO); | ||
2265 | MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 0)"); | ||
2266 | |||
2267 | module_param_named(queues_num, iwl4965_mod_params.num_of_queues, int, S_IRUGO); | ||
2268 | MODULE_PARM_DESC(queues_num, "number of hw queues."); | ||
2269 | /* 11n */ | ||
2270 | module_param_named(11n_disable, iwl4965_mod_params.disable_11n, int, S_IRUGO); | ||
2271 | MODULE_PARM_DESC(11n_disable, "disable 11n functionality"); | ||
2272 | module_param_named(amsdu_size_8K, iwl4965_mod_params.amsdu_size_8K, | ||
2273 | int, S_IRUGO); | ||
2274 | MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size"); | ||
2275 | |||
2276 | module_param_named(fw_restart4965, iwl4965_mod_params.restart_fw, int, S_IRUGO); | ||
2277 | MODULE_PARM_DESC(fw_restart4965, "restart firmware in case of error"); | ||