diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2012-02-03 11:31:44 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-06 14:56:00 -0500 |
commit | b16db50a6dc486c3a6c32cd7982a75452cb785c2 (patch) | |
tree | 3d64888f2a5a5d5538606c2cbcf165d628fba4e9 | |
parent | 8f9e56455310a3d75e8239db9729acb2b31dbdad (diff) |
iwlegacy: move bcast_sta_id to hw_params
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlegacy/3945-mac.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/3945-rs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/3945.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/4965-mac.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/4965.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.h | 6 |
7 files changed, 19 insertions, 18 deletions
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c index 8072ae8b0ce8..b11701f58741 100644 --- a/drivers/net/wireless/iwlegacy/3945-mac.c +++ b/drivers/net/wireless/iwlegacy/3945-mac.c | |||
@@ -140,7 +140,7 @@ il3945_set_ccmp_dynamic_key_info(struct il_priv *il, | |||
140 | key_flags |= (STA_KEY_FLG_CCMP | STA_KEY_FLG_MAP_KEY_MSK); | 140 | key_flags |= (STA_KEY_FLG_CCMP | STA_KEY_FLG_MAP_KEY_MSK); |
141 | key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); | 141 | key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); |
142 | 142 | ||
143 | if (sta_id == il->ctx.bcast_sta_id) | 143 | if (sta_id == il->hw_params.bcast_id) |
144 | key_flags |= STA_KEY_MULTICAST_MSK; | 144 | key_flags |= STA_KEY_MULTICAST_MSK; |
145 | 145 | ||
146 | keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; | 146 | keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; |
@@ -2598,7 +2598,7 @@ il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
2598 | /* We don't build a direct scan probe request; the uCode will do | 2598 | /* We don't build a direct scan probe request; the uCode will do |
2599 | * that based on the direct_mask added to each channel entry */ | 2599 | * that based on the direct_mask added to each channel entry */ |
2600 | scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK; | 2600 | scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK; |
2601 | scan->tx_cmd.sta_id = il->ctx.bcast_sta_id; | 2601 | scan->tx_cmd.sta_id = il->hw_params.bcast_id; |
2602 | scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; | 2602 | scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; |
2603 | 2603 | ||
2604 | /* flags + rate selection */ | 2604 | /* flags + rate selection */ |
diff --git a/drivers/net/wireless/iwlegacy/3945-rs.c b/drivers/net/wireless/iwlegacy/3945-rs.c index 40d17d7fcfef..6a782b5c0c5f 100644 --- a/drivers/net/wireless/iwlegacy/3945-rs.c +++ b/drivers/net/wireless/iwlegacy/3945-rs.c | |||
@@ -342,7 +342,7 @@ il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_id) | |||
342 | int i; | 342 | int i; |
343 | 343 | ||
344 | D_INFO("enter\n"); | 344 | D_INFO("enter\n"); |
345 | if (sta_id == il->ctx.bcast_sta_id) | 345 | if (sta_id == il->hw_params.bcast_id) |
346 | goto out; | 346 | goto out; |
347 | 347 | ||
348 | psta = (struct il3945_sta_priv *)sta->drv_priv; | 348 | psta = (struct il3945_sta_priv *)sta->drv_priv; |
diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c index dc0433f6801c..3024645a6be9 100644 --- a/drivers/net/wireless/iwlegacy/3945.c +++ b/drivers/net/wireless/iwlegacy/3945.c | |||
@@ -2396,6 +2396,8 @@ il3945_hw_set_hw_params(struct il_priv *il) | |||
2396 | return -ENOMEM; | 2396 | return -ENOMEM; |
2397 | } | 2397 | } |
2398 | 2398 | ||
2399 | il->hw_params.bcast_id = IL3945_BROADCAST_ID; | ||
2400 | |||
2399 | /* Assign number of Usable TX queues */ | 2401 | /* Assign number of Usable TX queues */ |
2400 | il->hw_params.max_txq_num = il->cfg->base_params->num_of_queues; | 2402 | il->hw_params.max_txq_num = il->cfg->base_params->num_of_queues; |
2401 | 2403 | ||
@@ -2404,7 +2406,6 @@ il3945_hw_set_hw_params(struct il_priv *il) | |||
2404 | il->hw_params.max_rxq_size = RX_QUEUE_SIZE; | 2406 | il->hw_params.max_rxq_size = RX_QUEUE_SIZE; |
2405 | il->hw_params.max_rxq_log = RX_QUEUE_SIZE_LOG; | 2407 | il->hw_params.max_rxq_log = RX_QUEUE_SIZE_LOG; |
2406 | il->hw_params.max_stations = IL3945_STATION_COUNT; | 2408 | il->hw_params.max_stations = IL3945_STATION_COUNT; |
2407 | il->ctx.bcast_sta_id = IL3945_BROADCAST_ID; | ||
2408 | 2409 | ||
2409 | il->sta_key_max_num = STA_KEY_MAX_NUM; | 2410 | il->sta_key_max_num = STA_KEY_MAX_NUM; |
2410 | 2411 | ||
@@ -2425,7 +2426,7 @@ il3945_hw_get_beacon_cmd(struct il_priv *il, struct il3945_frame *frame, | |||
2425 | tx_beacon_cmd = (struct il3945_tx_beacon_cmd *)&frame->u; | 2426 | tx_beacon_cmd = (struct il3945_tx_beacon_cmd *)&frame->u; |
2426 | memset(tx_beacon_cmd, 0, sizeof(*tx_beacon_cmd)); | 2427 | memset(tx_beacon_cmd, 0, sizeof(*tx_beacon_cmd)); |
2427 | 2428 | ||
2428 | tx_beacon_cmd->tx.sta_id = il->ctx.bcast_sta_id; | 2429 | tx_beacon_cmd->tx.sta_id = il->hw_params.bcast_id; |
2429 | tx_beacon_cmd->tx.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; | 2430 | tx_beacon_cmd->tx.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; |
2430 | 2431 | ||
2431 | frame_size = | 2432 | frame_size = |
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c index f2b03cd243b5..af7886243fe0 100644 --- a/drivers/net/wireless/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/iwlegacy/4965-mac.c | |||
@@ -919,7 +919,7 @@ il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
919 | D_SCAN("Start passive scan.\n"); | 919 | D_SCAN("Start passive scan.\n"); |
920 | 920 | ||
921 | scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK; | 921 | scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK; |
922 | scan->tx_cmd.sta_id = ctx->bcast_sta_id; | 922 | scan->tx_cmd.sta_id = il->hw_params.bcast_id; |
923 | scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; | 923 | scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; |
924 | 924 | ||
925 | switch (il->scan_band) { | 925 | switch (il->scan_band) { |
@@ -1678,7 +1678,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
1678 | 1678 | ||
1679 | /* For management frames use broadcast id to do not break aggregation */ | 1679 | /* For management frames use broadcast id to do not break aggregation */ |
1680 | if (!ieee80211_is_data(fc)) | 1680 | if (!ieee80211_is_data(fc)) |
1681 | sta_id = ctx->bcast_sta_id; | 1681 | sta_id = il->hw_params.bcast_id; |
1682 | else { | 1682 | else { |
1683 | /* Find idx into station table for destination station */ | 1683 | /* Find idx into station table for destination station */ |
1684 | sta_id = il_sta_id_or_broadcast(il, ctx, info->control.sta); | 1684 | sta_id = il_sta_id_or_broadcast(il, ctx, info->control.sta); |
@@ -2938,7 +2938,7 @@ il4965_set_wep_dynamic_key_info(struct il_priv *il, struct il_rxon_context *ctx, | |||
2938 | if (keyconf->keylen == WEP_KEY_LEN_128) | 2938 | if (keyconf->keylen == WEP_KEY_LEN_128) |
2939 | key_flags |= STA_KEY_FLG_KEY_SIZE_MSK; | 2939 | key_flags |= STA_KEY_FLG_KEY_SIZE_MSK; |
2940 | 2940 | ||
2941 | if (sta_id == ctx->bcast_sta_id) | 2941 | if (sta_id == il->hw_params.bcast_id) |
2942 | key_flags |= STA_KEY_MULTICAST_MSK; | 2942 | key_flags |= STA_KEY_MULTICAST_MSK; |
2943 | 2943 | ||
2944 | spin_lock_irqsave(&il->sta_lock, flags); | 2944 | spin_lock_irqsave(&il->sta_lock, flags); |
@@ -2988,7 +2988,7 @@ il4965_set_ccmp_dynamic_key_info(struct il_priv *il, | |||
2988 | key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); | 2988 | key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); |
2989 | key_flags &= ~STA_KEY_FLG_INVALID; | 2989 | key_flags &= ~STA_KEY_FLG_INVALID; |
2990 | 2990 | ||
2991 | if (sta_id == ctx->bcast_sta_id) | 2991 | if (sta_id == il->hw_params.bcast_id) |
2992 | key_flags |= STA_KEY_MULTICAST_MSK; | 2992 | key_flags |= STA_KEY_MULTICAST_MSK; |
2993 | 2993 | ||
2994 | keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; | 2994 | keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; |
@@ -3035,7 +3035,7 @@ il4965_set_tkip_dynamic_key_info(struct il_priv *il, | |||
3035 | key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); | 3035 | key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); |
3036 | key_flags &= ~STA_KEY_FLG_INVALID; | 3036 | key_flags &= ~STA_KEY_FLG_INVALID; |
3037 | 3037 | ||
3038 | if (sta_id == ctx->bcast_sta_id) | 3038 | if (sta_id == il->hw_params.bcast_id) |
3039 | key_flags |= STA_KEY_MULTICAST_MSK; | 3039 | key_flags |= STA_KEY_MULTICAST_MSK; |
3040 | 3040 | ||
3041 | keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; | 3041 | keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; |
@@ -3253,7 +3253,7 @@ il4965_update_bcast_station(struct il_priv *il, struct il_rxon_context *ctx) | |||
3253 | { | 3253 | { |
3254 | unsigned long flags; | 3254 | unsigned long flags; |
3255 | struct il_link_quality_cmd *link_cmd; | 3255 | struct il_link_quality_cmd *link_cmd; |
3256 | u8 sta_id = ctx->bcast_sta_id; | 3256 | u8 sta_id = il->hw_params.bcast_id; |
3257 | 3257 | ||
3258 | link_cmd = il4965_sta_alloc_lq(il, sta_id); | 3258 | link_cmd = il4965_sta_alloc_lq(il, sta_id); |
3259 | if (!link_cmd) { | 3259 | if (!link_cmd) { |
@@ -3510,7 +3510,7 @@ il4965_hw_get_beacon_cmd(struct il_priv *il, struct il_frame *frame) | |||
3510 | 3510 | ||
3511 | /* Set up TX command fields */ | 3511 | /* Set up TX command fields */ |
3512 | tx_beacon_cmd->tx.len = cpu_to_le16((u16) frame_size); | 3512 | tx_beacon_cmd->tx.len = cpu_to_le16((u16) frame_size); |
3513 | tx_beacon_cmd->tx.sta_id = il->beacon_ctx->bcast_sta_id; | 3513 | tx_beacon_cmd->tx.sta_id = il->hw_params.bcast_id; |
3514 | tx_beacon_cmd->tx.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; | 3514 | tx_beacon_cmd->tx.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; |
3515 | tx_beacon_cmd->tx.tx_flags = | 3515 | tx_beacon_cmd->tx.tx_flags = |
3516 | TX_CMD_FLG_SEQ_CTL_MSK | TX_CMD_FLG_TSF_MSK | | 3516 | TX_CMD_FLG_SEQ_CTL_MSK | TX_CMD_FLG_TSF_MSK | |
@@ -6082,6 +6082,7 @@ il4965_hw_detect(struct il_priv *il) | |||
6082 | static int | 6082 | static int |
6083 | il4965_set_hw_params(struct il_priv *il) | 6083 | il4965_set_hw_params(struct il_priv *il) |
6084 | { | 6084 | { |
6085 | il->hw_params.bcast_id = IL4965_BROADCAST_ID; | ||
6085 | il->hw_params.max_rxq_size = RX_QUEUE_SIZE; | 6086 | il->hw_params.max_rxq_size = RX_QUEUE_SIZE; |
6086 | il->hw_params.max_rxq_log = RX_QUEUE_SIZE_LOG; | 6087 | il->hw_params.max_rxq_log = RX_QUEUE_SIZE_LOG; |
6087 | if (il->cfg->mod_params->amsdu_size_8K) | 6088 | if (il->cfg->mod_params->amsdu_size_8K) |
diff --git a/drivers/net/wireless/iwlegacy/4965.c b/drivers/net/wireless/iwlegacy/4965.c index 8926108118f6..8d0fd60bc491 100644 --- a/drivers/net/wireless/iwlegacy/4965.c +++ b/drivers/net/wireless/iwlegacy/4965.c | |||
@@ -624,7 +624,6 @@ il4965_hw_set_hw_params(struct il_priv *il) | |||
624 | sizeof(struct il4965_scd_bc_tbl); | 624 | sizeof(struct il4965_scd_bc_tbl); |
625 | il->hw_params.tfd_size = sizeof(struct il_tfd); | 625 | il->hw_params.tfd_size = sizeof(struct il_tfd); |
626 | il->hw_params.max_stations = IL4965_STATION_COUNT; | 626 | il->hw_params.max_stations = IL4965_STATION_COUNT; |
627 | il->ctx.bcast_sta_id = IL4965_BROADCAST_ID; | ||
628 | il->hw_params.max_data_size = IL49_RTC_DATA_SIZE; | 627 | il->hw_params.max_data_size = IL49_RTC_DATA_SIZE; |
629 | il->hw_params.max_inst_size = IL49_RTC_INST_SIZE; | 628 | il->hw_params.max_inst_size = IL49_RTC_INST_SIZE; |
630 | il->hw_params.max_bsm_size = BSM_SRAM_SIZE; | 629 | il->hw_params.max_bsm_size = BSM_SRAM_SIZE; |
@@ -1968,7 +1967,7 @@ il4965_find_station(struct il_priv *il, const u8 * addr) | |||
1968 | start = IL_STA_ID; | 1967 | start = IL_STA_ID; |
1969 | 1968 | ||
1970 | if (is_broadcast_ether_addr(addr)) | 1969 | if (is_broadcast_ether_addr(addr)) |
1971 | return il->ctx.bcast_sta_id; | 1970 | return il->hw_params.bcast_id; |
1972 | 1971 | ||
1973 | spin_lock_irqsave(&il->sta_lock, flags); | 1972 | spin_lock_irqsave(&il->sta_lock, flags); |
1974 | for (i = start; i < il->hw_params.max_stations; i++) | 1973 | for (i = start; i < il->hw_params.max_stations; i++) |
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c index d30a2062992b..b7567a8063be 100644 --- a/drivers/net/wireless/iwlegacy/common.c +++ b/drivers/net/wireless/iwlegacy/common.c | |||
@@ -1901,7 +1901,7 @@ il_prep_station(struct il_priv *il, struct il_rxon_context *ctx, | |||
1901 | if (is_ap) | 1901 | if (is_ap) |
1902 | sta_id = IL_AP_ID; | 1902 | sta_id = IL_AP_ID; |
1903 | else if (is_broadcast_ether_addr(addr)) | 1903 | else if (is_broadcast_ether_addr(addr)) |
1904 | sta_id = ctx->bcast_sta_id; | 1904 | sta_id = il->hw_params.bcast_id; |
1905 | else | 1905 | else |
1906 | for (i = IL_STA_ID; i < il->hw_params.max_stations; i++) { | 1906 | for (i = IL_STA_ID; i < il->hw_params.max_stations; i++) { |
1907 | if (!compare_ether_addr | 1907 | if (!compare_ether_addr |
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h index cf7352f45cdb..66d0c1dd5894 100644 --- a/drivers/net/wireless/iwlegacy/common.h +++ b/drivers/net/wireless/iwlegacy/common.h | |||
@@ -816,6 +816,7 @@ struct il_sensitivity_ranges { | |||
816 | 816 | ||
817 | /** | 817 | /** |
818 | * struct il_hw_params | 818 | * struct il_hw_params |
819 | * @bcast_id: f/w broadcast station ID | ||
819 | * @max_txq_num: Max # Tx queues supported | 820 | * @max_txq_num: Max # Tx queues supported |
820 | * @dma_chnl_num: Number of Tx DMA/FIFO channels | 821 | * @dma_chnl_num: Number of Tx DMA/FIFO channels |
821 | * @scd_bc_tbls_size: size of scheduler byte count tables | 822 | * @scd_bc_tbls_size: size of scheduler byte count tables |
@@ -836,6 +837,7 @@ struct il_sensitivity_ranges { | |||
836 | * @struct il_sensitivity_ranges: range of sensitivity values | 837 | * @struct il_sensitivity_ranges: range of sensitivity values |
837 | */ | 838 | */ |
838 | struct il_hw_params { | 839 | struct il_hw_params { |
840 | u8 bcast_id; | ||
839 | u8 max_txq_num; | 841 | u8 max_txq_num; |
840 | u8 dma_chnl_num; | 842 | u8 dma_chnl_num; |
841 | u16 scd_bc_tbls_size; | 843 | u16 scd_bc_tbls_size; |
@@ -1173,8 +1175,6 @@ struct il_rxon_context { | |||
1173 | 1175 | ||
1174 | struct il_qos_info qos_data; | 1176 | struct il_qos_info qos_data; |
1175 | 1177 | ||
1176 | u8 bcast_sta_id; | ||
1177 | |||
1178 | struct il_wep_key wep_keys[WEP_KEYS_MAX]; | 1178 | struct il_wep_key wep_keys[WEP_KEYS_MAX]; |
1179 | u8 key_mapping_keys; | 1179 | u8 key_mapping_keys; |
1180 | 1180 | ||
@@ -2372,7 +2372,7 @@ il_sta_id_or_broadcast(struct il_priv *il, struct il_rxon_context *context, | |||
2372 | int sta_id; | 2372 | int sta_id; |
2373 | 2373 | ||
2374 | if (!sta) | 2374 | if (!sta) |
2375 | return context->bcast_sta_id; | 2375 | return il->hw_params.bcast_id; |
2376 | 2376 | ||
2377 | sta_id = il_sta_id(sta); | 2377 | sta_id = il_sta_id(sta); |
2378 | 2378 | ||