diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 44 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 19 |
2 files changed, 21 insertions, 42 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 125d99e9476..5041368a9a2 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -1352,7 +1352,6 @@ static int iwl_update_sta_key_info(struct iwl_priv *priv, | |||
1352 | break; | 1352 | break; |
1353 | case ALG_TKIP: | 1353 | case ALG_TKIP: |
1354 | case ALG_WEP: | 1354 | case ALG_WEP: |
1355 | return -EINVAL; | ||
1356 | default: | 1355 | default: |
1357 | return -EINVAL; | 1356 | return -EINVAL; |
1358 | } | 1357 | } |
@@ -2647,11 +2646,9 @@ static void iwl_build_tx_cmd_basic(struct iwl_priv *priv, | |||
2647 | if ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) { | 2646 | if ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) { |
2648 | if ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_ASSOC_REQ || | 2647 | if ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_ASSOC_REQ || |
2649 | (fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_REASSOC_REQ) | 2648 | (fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_REASSOC_REQ) |
2650 | cmd->cmd.tx.timeout.pm_frame_timeout = | 2649 | cmd->cmd.tx.timeout.pm_frame_timeout = cpu_to_le16(3); |
2651 | cpu_to_le16(3); | ||
2652 | else | 2650 | else |
2653 | cmd->cmd.tx.timeout.pm_frame_timeout = | 2651 | cmd->cmd.tx.timeout.pm_frame_timeout = cpu_to_le16(2); |
2654 | cpu_to_le16(2); | ||
2655 | } else | 2652 | } else |
2656 | cmd->cmd.tx.timeout.pm_frame_timeout = 0; | 2653 | cmd->cmd.tx.timeout.pm_frame_timeout = 0; |
2657 | 2654 | ||
@@ -3158,24 +3155,21 @@ int is_duplicate_packet(struct iwl_priv *priv, struct ieee80211_hdr *header) | |||
3158 | int index = mac[5] & (IWL_IBSS_MAC_HASH_SIZE - 1); | 3155 | int index = mac[5] & (IWL_IBSS_MAC_HASH_SIZE - 1); |
3159 | 3156 | ||
3160 | __list_for_each(p, &priv->ibss_mac_hash[index]) { | 3157 | __list_for_each(p, &priv->ibss_mac_hash[index]) { |
3161 | entry = | 3158 | entry = list_entry(p, struct iwl_ibss_seq, list); |
3162 | list_entry(p, struct iwl_ibss_seq, list); | ||
3163 | if (!compare_ether_addr(entry->mac, mac)) | 3159 | if (!compare_ether_addr(entry->mac, mac)) |
3164 | break; | 3160 | break; |
3165 | } | 3161 | } |
3166 | if (p == &priv->ibss_mac_hash[index]) { | 3162 | if (p == &priv->ibss_mac_hash[index]) { |
3167 | entry = kzalloc(sizeof(*entry), GFP_ATOMIC); | 3163 | entry = kzalloc(sizeof(*entry), GFP_ATOMIC); |
3168 | if (!entry) { | 3164 | if (!entry) { |
3169 | IWL_ERROR | 3165 | IWL_ERROR("Cannot malloc new mac entry\n"); |
3170 | ("Cannot malloc new mac entry\n"); | ||
3171 | return 0; | 3166 | return 0; |
3172 | } | 3167 | } |
3173 | memcpy(entry->mac, mac, ETH_ALEN); | 3168 | memcpy(entry->mac, mac, ETH_ALEN); |
3174 | entry->seq_num = seq; | 3169 | entry->seq_num = seq; |
3175 | entry->frag_num = frag; | 3170 | entry->frag_num = frag; |
3176 | entry->packet_time = jiffies; | 3171 | entry->packet_time = jiffies; |
3177 | list_add(&entry->list, | 3172 | list_add(&entry->list, &priv->ibss_mac_hash[index]); |
3178 | &priv->ibss_mac_hash[index]); | ||
3179 | return 0; | 3173 | return 0; |
3180 | } | 3174 | } |
3181 | last_seq = &entry->seq_num; | 3175 | last_seq = &entry->seq_num; |
@@ -3322,9 +3316,8 @@ static int iwl_get_measurement(struct iwl_priv *priv, | |||
3322 | switch (spectrum_resp_status) { | 3316 | switch (spectrum_resp_status) { |
3323 | case 0: /* Command will be handled */ | 3317 | case 0: /* Command will be handled */ |
3324 | if (res->u.spectrum.id != 0xff) { | 3318 | if (res->u.spectrum.id != 0xff) { |
3325 | IWL_DEBUG_INFO | 3319 | IWL_DEBUG_INFO("Replaced existing measurement: %d\n", |
3326 | ("Replaced existing measurement: %d\n", | 3320 | res->u.spectrum.id); |
3327 | res->u.spectrum.id); | ||
3328 | priv->measurement_status &= ~MEASUREMENT_READY; | 3321 | priv->measurement_status &= ~MEASUREMENT_READY; |
3329 | } | 3322 | } |
3330 | priv->measurement_status |= MEASUREMENT_ACTIVE; | 3323 | priv->measurement_status |= MEASUREMENT_ACTIVE; |
@@ -5527,8 +5520,7 @@ static int iwl_verify_inst_full(struct iwl_priv *priv, __le32 * image, u32 len) | |||
5527 | iwl_release_restricted_access(priv); | 5520 | iwl_release_restricted_access(priv); |
5528 | 5521 | ||
5529 | if (!errcnt) | 5522 | if (!errcnt) |
5530 | IWL_DEBUG_INFO | 5523 | IWL_DEBUG_INFO("ucode image in INSTRUCTION memory is good\n"); |
5531 | ("ucode image in INSTRUCTION memory is good\n"); | ||
5532 | 5524 | ||
5533 | return rc; | 5525 | return rc; |
5534 | } | 5526 | } |
@@ -5827,16 +5819,11 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
5827 | boot_size = le32_to_cpu(ucode->boot_size); | 5819 | boot_size = le32_to_cpu(ucode->boot_size); |
5828 | 5820 | ||
5829 | IWL_DEBUG_INFO("f/w package hdr ucode version = 0x%x\n", ver); | 5821 | IWL_DEBUG_INFO("f/w package hdr ucode version = 0x%x\n", ver); |
5830 | IWL_DEBUG_INFO("f/w package hdr runtime inst size = %u\n", | 5822 | IWL_DEBUG_INFO("f/w package hdr runtime inst size = %u\n", inst_size); |
5831 | inst_size); | 5823 | IWL_DEBUG_INFO("f/w package hdr runtime data size = %u\n", data_size); |
5832 | IWL_DEBUG_INFO("f/w package hdr runtime data size = %u\n", | 5824 | IWL_DEBUG_INFO("f/w package hdr init inst size = %u\n", init_size); |
5833 | data_size); | 5825 | IWL_DEBUG_INFO("f/w package hdr init data size = %u\n", init_data_size); |
5834 | IWL_DEBUG_INFO("f/w package hdr init inst size = %u\n", | 5826 | IWL_DEBUG_INFO("f/w package hdr boot inst size = %u\n", boot_size); |
5835 | init_size); | ||
5836 | IWL_DEBUG_INFO("f/w package hdr init data size = %u\n", | ||
5837 | init_data_size); | ||
5838 | IWL_DEBUG_INFO("f/w package hdr boot inst size = %u\n", | ||
5839 | boot_size); | ||
5840 | 5827 | ||
5841 | /* Verify size of file vs. image size info in file's header */ | 5828 | /* Verify size of file vs. image size info in file's header */ |
5842 | if (ucode_raw->size < sizeof(*ucode) + | 5829 | if (ucode_raw->size < sizeof(*ucode) + |
@@ -6827,7 +6814,7 @@ static void iwl_bg_post_associate(struct work_struct *data) | |||
6827 | 6814 | ||
6828 | default: | 6815 | default: |
6829 | IWL_ERROR("%s Should not be called in %d mode\n", | 6816 | IWL_ERROR("%s Should not be called in %d mode\n", |
6830 | __FUNCTION__, priv->iw_mode); | 6817 | __FUNCTION__, priv->iw_mode); |
6831 | break; | 6818 | break; |
6832 | } | 6819 | } |
6833 | 6820 | ||
@@ -6841,8 +6828,7 @@ static void iwl_bg_post_associate(struct work_struct *data) | |||
6841 | 6828 | ||
6842 | static void iwl_bg_abort_scan(struct work_struct *work) | 6829 | static void iwl_bg_abort_scan(struct work_struct *work) |
6843 | { | 6830 | { |
6844 | struct iwl_priv *priv = container_of(work, struct iwl_priv, | 6831 | struct iwl_priv *priv = container_of(work, struct iwl_priv, abort_scan); |
6845 | abort_scan); | ||
6846 | 6832 | ||
6847 | if (!iwl_is_ready(priv)) | 6833 | if (!iwl_is_ready(priv)) |
6848 | return; | 6834 | return; |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 0a878cf49e0..076c5518211 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -1384,7 +1384,6 @@ static int iwl_update_sta_key_info(struct iwl_priv *priv, | |||
1384 | break; | 1384 | break; |
1385 | case ALG_TKIP: | 1385 | case ALG_TKIP: |
1386 | case ALG_WEP: | 1386 | case ALG_WEP: |
1387 | return -EINVAL; | ||
1388 | default: | 1387 | default: |
1389 | return -EINVAL; | 1388 | return -EINVAL; |
1390 | } | 1389 | } |
@@ -2734,11 +2733,9 @@ static void iwl_build_tx_cmd_basic(struct iwl_priv *priv, | |||
2734 | if ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) { | 2733 | if ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) { |
2735 | if ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_ASSOC_REQ || | 2734 | if ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_ASSOC_REQ || |
2736 | (fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_REASSOC_REQ) | 2735 | (fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_REASSOC_REQ) |
2737 | cmd->cmd.tx.timeout.pm_frame_timeout = | 2736 | cmd->cmd.tx.timeout.pm_frame_timeout = cpu_to_le16(3); |
2738 | cpu_to_le16(3); | ||
2739 | else | 2737 | else |
2740 | cmd->cmd.tx.timeout.pm_frame_timeout = | 2738 | cmd->cmd.tx.timeout.pm_frame_timeout = cpu_to_le16(2); |
2741 | cpu_to_le16(2); | ||
2742 | } else | 2739 | } else |
2743 | cmd->cmd.tx.timeout.pm_frame_timeout = 0; | 2740 | cmd->cmd.tx.timeout.pm_frame_timeout = 0; |
2744 | 2741 | ||
@@ -3249,24 +3246,21 @@ int is_duplicate_packet(struct iwl_priv *priv, struct ieee80211_hdr *header) | |||
3249 | int index = mac[5] & (IWL_IBSS_MAC_HASH_SIZE - 1); | 3246 | int index = mac[5] & (IWL_IBSS_MAC_HASH_SIZE - 1); |
3250 | 3247 | ||
3251 | __list_for_each(p, &priv->ibss_mac_hash[index]) { | 3248 | __list_for_each(p, &priv->ibss_mac_hash[index]) { |
3252 | entry = | 3249 | entry = list_entry(p, struct iwl_ibss_seq, list); |
3253 | list_entry(p, struct iwl_ibss_seq, list); | ||
3254 | if (!compare_ether_addr(entry->mac, mac)) | 3250 | if (!compare_ether_addr(entry->mac, mac)) |
3255 | break; | 3251 | break; |
3256 | } | 3252 | } |
3257 | if (p == &priv->ibss_mac_hash[index]) { | 3253 | if (p == &priv->ibss_mac_hash[index]) { |
3258 | entry = kzalloc(sizeof(*entry), GFP_ATOMIC); | 3254 | entry = kzalloc(sizeof(*entry), GFP_ATOMIC); |
3259 | if (!entry) { | 3255 | if (!entry) { |
3260 | IWL_ERROR | 3256 | IWL_ERROR("Cannot malloc new mac entry\n"); |
3261 | ("Cannot malloc new mac entry\n"); | ||
3262 | return 0; | 3257 | return 0; |
3263 | } | 3258 | } |
3264 | memcpy(entry->mac, mac, ETH_ALEN); | 3259 | memcpy(entry->mac, mac, ETH_ALEN); |
3265 | entry->seq_num = seq; | 3260 | entry->seq_num = seq; |
3266 | entry->frag_num = frag; | 3261 | entry->frag_num = frag; |
3267 | entry->packet_time = jiffies; | 3262 | entry->packet_time = jiffies; |
3268 | list_add(&entry->list, | 3263 | list_add(&entry->list, &priv->ibss_mac_hash[index]); |
3269 | &priv->ibss_mac_hash[index]); | ||
3270 | return 0; | 3264 | return 0; |
3271 | } | 3265 | } |
3272 | last_seq = &entry->seq_num; | 3266 | last_seq = &entry->seq_num; |
@@ -7234,8 +7228,7 @@ static void iwl_bg_post_associate(struct work_struct *data) | |||
7234 | 7228 | ||
7235 | static void iwl_bg_abort_scan(struct work_struct *work) | 7229 | static void iwl_bg_abort_scan(struct work_struct *work) |
7236 | { | 7230 | { |
7237 | struct iwl_priv *priv = container_of(work, struct iwl_priv, | 7231 | struct iwl_priv *priv = container_of(work, struct iwl_priv, abort_scan); |
7238 | abort_scan); | ||
7239 | 7232 | ||
7240 | if (!iwl_is_ready(priv)) | 7233 | if (!iwl_is_ready(priv)) |
7241 | return; | 7234 | return; |