aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwmc3200wifi/rx.c
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2010-02-25 01:15:26 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-03-10 17:09:37 -0500
commit04d1c22761f33ac8f345665e7ef809c875142425 (patch)
tree3fc3676c87e89684819600b800240c2d5c9369fe /drivers/net/wireless/iwmc3200wifi/rx.c
parent7d49c6111c27f0e68b0310aeececf7ded53f7f94 (diff)
iwmc3200wifi: remove "_safe" for some list_for_each_entry usage
Use list_for_each_entry instead of list_for_each_entry_safe in places iteration against list entry removal is not required. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/rx.c')
-rw-r--r--drivers/net/wireless/iwmc3200wifi/rx.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c
index 36b1580329cc..cbaf8ae3aa37 100644
--- a/drivers/net/wireless/iwmc3200wifi/rx.c
+++ b/drivers/net/wireless/iwmc3200wifi/rx.c
@@ -342,12 +342,9 @@ static void iwm_rx_ticket_node_free(struct iwm_rx_ticket_node *ticket_node)
342static struct iwm_rx_packet *iwm_rx_packet_get(struct iwm_priv *iwm, u16 id) 342static struct iwm_rx_packet *iwm_rx_packet_get(struct iwm_priv *iwm, u16 id)
343{ 343{
344 u8 id_hash = IWM_RX_ID_GET_HASH(id); 344 u8 id_hash = IWM_RX_ID_GET_HASH(id);
345 struct list_head *packet_list; 345 struct iwm_rx_packet *packet;
346 struct iwm_rx_packet *packet, *next;
347
348 packet_list = &iwm->rx_packets[id_hash];
349 346
350 list_for_each_entry_safe(packet, next, packet_list, node) 347 list_for_each_entry(packet, &iwm->rx_packets[id_hash], node)
351 if (packet->id == id) 348 if (packet->id == id)
352 return packet; 349 return packet;
353 350
@@ -771,7 +768,7 @@ static int iwm_mlme_update_bss_table(struct iwm_priv *iwm, u8 *buf,
771 (struct iwm_umac_notif_bss_info *)buf; 768 (struct iwm_umac_notif_bss_info *)buf;
772 struct ieee80211_channel *channel; 769 struct ieee80211_channel *channel;
773 struct ieee80211_supported_band *band; 770 struct ieee80211_supported_band *band;
774 struct iwm_bss_info *bss, *next; 771 struct iwm_bss_info *bss;
775 s32 signal; 772 s32 signal;
776 int freq; 773 int freq;
777 u16 frame_len = le16_to_cpu(umac_bss->frame_len); 774 u16 frame_len = le16_to_cpu(umac_bss->frame_len);
@@ -790,7 +787,7 @@ static int iwm_mlme_update_bss_table(struct iwm_priv *iwm, u8 *buf,
790 IWM_DBG_MLME(iwm, DBG, "\tRSSI: %d\n", umac_bss->rssi); 787 IWM_DBG_MLME(iwm, DBG, "\tRSSI: %d\n", umac_bss->rssi);
791 IWM_DBG_MLME(iwm, DBG, "\tFrame Length: %d\n", frame_len); 788 IWM_DBG_MLME(iwm, DBG, "\tFrame Length: %d\n", frame_len);
792 789
793 list_for_each_entry_safe(bss, next, &iwm->bss_list, node) 790 list_for_each_entry(bss, &iwm->bss_list, node)
794 if (bss->bss->table_idx == umac_bss->table_idx) 791 if (bss->bss->table_idx == umac_bss->table_idx)
795 break; 792 break;
796 793
@@ -1331,7 +1328,7 @@ static int iwm_rx_handle_nonwifi(struct iwm_priv *iwm, u8 *buf,
1331{ 1328{
1332 u8 seq_num; 1329 u8 seq_num;
1333 struct iwm_udma_in_hdr *hdr = (struct iwm_udma_in_hdr *)buf; 1330 struct iwm_udma_in_hdr *hdr = (struct iwm_udma_in_hdr *)buf;
1334 struct iwm_nonwifi_cmd *cmd, *next; 1331 struct iwm_nonwifi_cmd *cmd;
1335 1332
1336 seq_num = GET_VAL32(hdr->cmd, UDMA_HDI_IN_CMD_NON_WIFI_HW_SEQ_NUM); 1333 seq_num = GET_VAL32(hdr->cmd, UDMA_HDI_IN_CMD_NON_WIFI_HW_SEQ_NUM);
1337 1334
@@ -1343,7 +1340,7 @@ static int iwm_rx_handle_nonwifi(struct iwm_priv *iwm, u8 *buf,
1343 * That means we only support synchronised non wifi command response 1340 * That means we only support synchronised non wifi command response
1344 * schemes. 1341 * schemes.
1345 */ 1342 */
1346 list_for_each_entry_safe(cmd, next, &iwm->nonwifi_pending_cmd, pending) 1343 list_for_each_entry(cmd, &iwm->nonwifi_pending_cmd, pending)
1347 if (cmd->seq_num == seq_num) { 1344 if (cmd->seq_num == seq_num) {
1348 cmd->resp_received = 1; 1345 cmd->resp_received = 1;
1349 cmd->buf.len = buf_size; 1346 cmd->buf.len = buf_size;