diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2008-05-29 04:35:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-03 15:00:25 -0400 |
commit | fe7a90c2b73f0c1da0882861cd015c835ed28781 (patch) | |
tree | d1fa71b76b77e23e2595c6c206b197618b12a93e /drivers/net/wireless/iwlwifi | |
parent | 972cf447d20df30dbd74edfc00ae179c4b822c68 (diff) |
iwlwifi: iwl-5000 add rxon_assoc
This patch adds rxon assoc command for 5000 HW.
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-5000.c | 48 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-commands.h | 17 |
2 files changed, 65 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 6a10526d939b..217c6a9596cd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -1250,7 +1250,55 @@ static int iwl5000_hw_valid_rtc_data_addr(u32 addr) | |||
1250 | (addr < IWL50_RTC_DATA_UPPER_BOUND); | 1250 | (addr < IWL50_RTC_DATA_UPPER_BOUND); |
1251 | } | 1251 | } |
1252 | 1252 | ||
1253 | static int iwl5000_send_rxon_assoc(struct iwl_priv *priv) | ||
1254 | { | ||
1255 | int ret = 0; | ||
1256 | struct iwl5000_rxon_assoc_cmd rxon_assoc; | ||
1257 | const struct iwl_rxon_cmd *rxon1 = &priv->staging_rxon; | ||
1258 | const struct iwl_rxon_cmd *rxon2 = &priv->active_rxon; | ||
1259 | |||
1260 | if ((rxon1->flags == rxon2->flags) && | ||
1261 | (rxon1->filter_flags == rxon2->filter_flags) && | ||
1262 | (rxon1->cck_basic_rates == rxon2->cck_basic_rates) && | ||
1263 | (rxon1->ofdm_ht_single_stream_basic_rates == | ||
1264 | rxon2->ofdm_ht_single_stream_basic_rates) && | ||
1265 | (rxon1->ofdm_ht_dual_stream_basic_rates == | ||
1266 | rxon2->ofdm_ht_dual_stream_basic_rates) && | ||
1267 | (rxon1->ofdm_ht_triple_stream_basic_rates == | ||
1268 | rxon2->ofdm_ht_triple_stream_basic_rates) && | ||
1269 | (rxon1->acquisition_data == rxon2->acquisition_data) && | ||
1270 | (rxon1->rx_chain == rxon2->rx_chain) && | ||
1271 | (rxon1->ofdm_basic_rates == rxon2->ofdm_basic_rates)) { | ||
1272 | IWL_DEBUG_INFO("Using current RXON_ASSOC. Not resending.\n"); | ||
1273 | return 0; | ||
1274 | } | ||
1275 | |||
1276 | rxon_assoc.flags = priv->staging_rxon.flags; | ||
1277 | rxon_assoc.filter_flags = priv->staging_rxon.filter_flags; | ||
1278 | rxon_assoc.ofdm_basic_rates = priv->staging_rxon.ofdm_basic_rates; | ||
1279 | rxon_assoc.cck_basic_rates = priv->staging_rxon.cck_basic_rates; | ||
1280 | rxon_assoc.reserved1 = 0; | ||
1281 | rxon_assoc.reserved2 = 0; | ||
1282 | rxon_assoc.reserved3 = 0; | ||
1283 | rxon_assoc.ofdm_ht_single_stream_basic_rates = | ||
1284 | priv->staging_rxon.ofdm_ht_single_stream_basic_rates; | ||
1285 | rxon_assoc.ofdm_ht_dual_stream_basic_rates = | ||
1286 | priv->staging_rxon.ofdm_ht_dual_stream_basic_rates; | ||
1287 | rxon_assoc.rx_chain_select_flags = priv->staging_rxon.rx_chain; | ||
1288 | rxon_assoc.ofdm_ht_triple_stream_basic_rates = | ||
1289 | priv->staging_rxon.ofdm_ht_triple_stream_basic_rates; | ||
1290 | rxon_assoc.acquisition_data = priv->staging_rxon.acquisition_data; | ||
1291 | |||
1292 | ret = iwl_send_cmd_pdu_async(priv, REPLY_RXON_ASSOC, | ||
1293 | sizeof(rxon_assoc), &rxon_assoc, NULL); | ||
1294 | if (ret) | ||
1295 | return ret; | ||
1296 | |||
1297 | return ret; | ||
1298 | } | ||
1299 | |||
1253 | static struct iwl_hcmd_ops iwl5000_hcmd = { | 1300 | static struct iwl_hcmd_ops iwl5000_hcmd = { |
1301 | .rxon_assoc = iwl5000_send_rxon_assoc, | ||
1254 | }; | 1302 | }; |
1255 | 1303 | ||
1256 | static struct iwl_hcmd_utils_ops iwl5000_hcmd_utils = { | 1304 | static struct iwl_hcmd_utils_ops iwl5000_hcmd_utils = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index 2652e3746ef5..fb6f5ffb9f1d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h | |||
@@ -630,6 +630,20 @@ struct iwl_rxon_cmd { | |||
630 | __le16 reserved6; | 630 | __le16 reserved6; |
631 | } __attribute__ ((packed)); | 631 | } __attribute__ ((packed)); |
632 | 632 | ||
633 | struct iwl5000_rxon_assoc_cmd { | ||
634 | __le32 flags; | ||
635 | __le32 filter_flags; | ||
636 | u8 ofdm_basic_rates; | ||
637 | u8 cck_basic_rates; | ||
638 | __le16 reserved1; | ||
639 | u8 ofdm_ht_single_stream_basic_rates; | ||
640 | u8 ofdm_ht_dual_stream_basic_rates; | ||
641 | u8 ofdm_ht_triple_stream_basic_rates; | ||
642 | u8 reserved2; | ||
643 | __le16 rx_chain_select_flags; | ||
644 | __le16 acquisition_data; | ||
645 | __le32 reserved3; | ||
646 | } __attribute__ ((packed)); | ||
633 | 647 | ||
634 | /* | 648 | /* |
635 | * REPLY_RXON_ASSOC = 0x11 (command, has simple generic response) | 649 | * REPLY_RXON_ASSOC = 0x11 (command, has simple generic response) |
@@ -645,6 +659,9 @@ struct iwl4965_rxon_assoc_cmd { | |||
645 | __le16 reserved; | 659 | __le16 reserved; |
646 | } __attribute__ ((packed)); | 660 | } __attribute__ ((packed)); |
647 | 661 | ||
662 | |||
663 | |||
664 | |||
648 | /* | 665 | /* |
649 | * REPLY_RXON_TIMING = 0x14 (command, has simple generic response) | 666 | * REPLY_RXON_TIMING = 0x14 (command, has simple generic response) |
650 | */ | 667 | */ |