diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-12-07 05:02:40 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-07 05:02:40 -0500 |
commit | 359f2d17e32b32f53577375f83fb06d34e31bfe8 (patch) | |
tree | 2890ffcf40fab2d2c24d2d208814afeb52bb12e5 /drivers/net/wireless/hostap | |
parent | 0efdf2626676db4b30d343ff88f8461ad09130da (diff) | |
parent | 720eeb4332e5871c97d390b2fb55a5a74fb18ae6 (diff) |
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream
Conflicts:
drivers/net/wireless/zd1211rw/zd_mac.h
net/ieee80211/softmac/ieee80211softmac_assoc.c
Diffstat (limited to 'drivers/net/wireless/hostap')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_ap.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_download.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_hw.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_info.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_ioctl.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_pci.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_plx.c | 3 |
8 files changed, 12 insertions, 32 deletions
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c index 08bc57a4b895..974a8e5bec8b 100644 --- a/drivers/net/wireless/hostap/hostap_ap.c +++ b/drivers/net/wireless/hostap/hostap_ap.c | |||
@@ -1100,15 +1100,13 @@ static struct sta_info * ap_add_sta(struct ap_data *ap, u8 *addr) | |||
1100 | { | 1100 | { |
1101 | struct sta_info *sta; | 1101 | struct sta_info *sta; |
1102 | 1102 | ||
1103 | sta = (struct sta_info *) | 1103 | sta = kzalloc(sizeof(struct sta_info), GFP_ATOMIC); |
1104 | kmalloc(sizeof(struct sta_info), GFP_ATOMIC); | ||
1105 | if (sta == NULL) { | 1104 | if (sta == NULL) { |
1106 | PDEBUG(DEBUG_AP, "AP: kmalloc failed\n"); | 1105 | PDEBUG(DEBUG_AP, "AP: kmalloc failed\n"); |
1107 | return NULL; | 1106 | return NULL; |
1108 | } | 1107 | } |
1109 | 1108 | ||
1110 | /* initialize STA info data */ | 1109 | /* initialize STA info data */ |
1111 | memset(sta, 0, sizeof(struct sta_info)); | ||
1112 | sta->local = ap->local; | 1110 | sta->local = ap->local; |
1113 | skb_queue_head_init(&sta->tx_buf); | 1111 | skb_queue_head_init(&sta->tx_buf); |
1114 | memcpy(sta->addr, addr, ETH_ALEN); | 1112 | memcpy(sta->addr, addr, ETH_ALEN); |
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index ee542ec6d6a8..8d8f4b9b8b07 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -563,12 +563,11 @@ static int prism2_config(struct pcmcia_device *link) | |||
563 | PDEBUG(DEBUG_FLOW, "prism2_config()\n"); | 563 | PDEBUG(DEBUG_FLOW, "prism2_config()\n"); |
564 | 564 | ||
565 | parse = kmalloc(sizeof(cisparse_t), GFP_KERNEL); | 565 | parse = kmalloc(sizeof(cisparse_t), GFP_KERNEL); |
566 | hw_priv = kmalloc(sizeof(*hw_priv), GFP_KERNEL); | 566 | hw_priv = kzalloc(sizeof(*hw_priv), GFP_KERNEL); |
567 | if (parse == NULL || hw_priv == NULL) { | 567 | if (parse == NULL || hw_priv == NULL) { |
568 | ret = -ENOMEM; | 568 | ret = -ENOMEM; |
569 | goto failed; | 569 | goto failed; |
570 | } | 570 | } |
571 | memset(hw_priv, 0, sizeof(*hw_priv)); | ||
572 | 571 | ||
573 | tuple.Attributes = 0; | 572 | tuple.Attributes = 0; |
574 | tuple.TupleData = buf; | 573 | tuple.TupleData = buf; |
diff --git a/drivers/net/wireless/hostap/hostap_download.c b/drivers/net/wireless/hostap/hostap_download.c index ab26b52b3e76..24fc387bba67 100644 --- a/drivers/net/wireless/hostap/hostap_download.c +++ b/drivers/net/wireless/hostap/hostap_download.c | |||
@@ -685,14 +685,12 @@ static int prism2_download(local_info_t *local, | |||
685 | goto out; | 685 | goto out; |
686 | } | 686 | } |
687 | 687 | ||
688 | dl = kmalloc(sizeof(*dl) + param->num_areas * | 688 | dl = kzalloc(sizeof(*dl) + param->num_areas * |
689 | sizeof(struct prism2_download_data_area), GFP_KERNEL); | 689 | sizeof(struct prism2_download_data_area), GFP_KERNEL); |
690 | if (dl == NULL) { | 690 | if (dl == NULL) { |
691 | ret = -ENOMEM; | 691 | ret = -ENOMEM; |
692 | goto out; | 692 | goto out; |
693 | } | 693 | } |
694 | memset(dl, 0, sizeof(*dl) + param->num_areas * | ||
695 | sizeof(struct prism2_download_data_area)); | ||
696 | dl->dl_cmd = param->dl_cmd; | 694 | dl->dl_cmd = param->dl_cmd; |
697 | dl->start_addr = param->start_addr; | 695 | dl->start_addr = param->start_addr; |
698 | dl->num_areas = param->num_areas; | 696 | dl->num_areas = param->num_areas; |
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index c19e68636a1c..a394a23b9a20 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -347,14 +347,12 @@ static int hfa384x_cmd(struct net_device *dev, u16 cmd, u16 param0, | |||
347 | if (signal_pending(current)) | 347 | if (signal_pending(current)) |
348 | return -EINTR; | 348 | return -EINTR; |
349 | 349 | ||
350 | entry = (struct hostap_cmd_queue *) | 350 | entry = kzalloc(sizeof(*entry), GFP_ATOMIC); |
351 | kmalloc(sizeof(*entry), GFP_ATOMIC); | ||
352 | if (entry == NULL) { | 351 | if (entry == NULL) { |
353 | printk(KERN_DEBUG "%s: hfa384x_cmd - kmalloc failed\n", | 352 | printk(KERN_DEBUG "%s: hfa384x_cmd - kmalloc failed\n", |
354 | dev->name); | 353 | dev->name); |
355 | return -ENOMEM; | 354 | return -ENOMEM; |
356 | } | 355 | } |
357 | memset(entry, 0, sizeof(*entry)); | ||
358 | atomic_set(&entry->usecnt, 1); | 356 | atomic_set(&entry->usecnt, 1); |
359 | entry->type = CMD_SLEEP; | 357 | entry->type = CMD_SLEEP; |
360 | entry->cmd = cmd; | 358 | entry->cmd = cmd; |
@@ -517,14 +515,12 @@ static int hfa384x_cmd_callback(struct net_device *dev, u16 cmd, u16 param0, | |||
517 | return -1; | 515 | return -1; |
518 | } | 516 | } |
519 | 517 | ||
520 | entry = (struct hostap_cmd_queue *) | 518 | entry = kzalloc(sizeof(*entry), GFP_ATOMIC); |
521 | kmalloc(sizeof(*entry), GFP_ATOMIC); | ||
522 | if (entry == NULL) { | 519 | if (entry == NULL) { |
523 | printk(KERN_DEBUG "%s: hfa384x_cmd_callback - kmalloc " | 520 | printk(KERN_DEBUG "%s: hfa384x_cmd_callback - kmalloc " |
524 | "failed\n", dev->name); | 521 | "failed\n", dev->name); |
525 | return -ENOMEM; | 522 | return -ENOMEM; |
526 | } | 523 | } |
527 | memset(entry, 0, sizeof(*entry)); | ||
528 | atomic_set(&entry->usecnt, 1); | 524 | atomic_set(&entry->usecnt, 1); |
529 | entry->type = CMD_CALLBACK; | 525 | entry->type = CMD_CALLBACK; |
530 | entry->cmd = cmd; | 526 | entry->cmd = cmd; |
@@ -3016,14 +3012,12 @@ static int prism2_set_tim(struct net_device *dev, int aid, int set) | |||
3016 | iface = netdev_priv(dev); | 3012 | iface = netdev_priv(dev); |
3017 | local = iface->local; | 3013 | local = iface->local; |
3018 | 3014 | ||
3019 | new_entry = (struct set_tim_data *) | 3015 | new_entry = kzalloc(sizeof(*new_entry), GFP_ATOMIC); |
3020 | kmalloc(sizeof(*new_entry), GFP_ATOMIC); | ||
3021 | if (new_entry == NULL) { | 3016 | if (new_entry == NULL) { |
3022 | printk(KERN_DEBUG "%s: prism2_set_tim: kmalloc failed\n", | 3017 | printk(KERN_DEBUG "%s: prism2_set_tim: kmalloc failed\n", |
3023 | local->dev->name); | 3018 | local->dev->name); |
3024 | return -ENOMEM; | 3019 | return -ENOMEM; |
3025 | } | 3020 | } |
3026 | memset(new_entry, 0, sizeof(*new_entry)); | ||
3027 | new_entry->aid = aid; | 3021 | new_entry->aid = aid; |
3028 | new_entry->set = set; | 3022 | new_entry->set = set; |
3029 | 3023 | ||
diff --git a/drivers/net/wireless/hostap/hostap_info.c b/drivers/net/wireless/hostap/hostap_info.c index 5fd2b1ad7f5e..b6a02a02da74 100644 --- a/drivers/net/wireless/hostap/hostap_info.c +++ b/drivers/net/wireless/hostap/hostap_info.c | |||
@@ -327,11 +327,10 @@ static void prism2_info_hostscanresults(local_info_t *local, | |||
327 | ptr = (u8 *) pos; | 327 | ptr = (u8 *) pos; |
328 | 328 | ||
329 | new_count = left / result_size; | 329 | new_count = left / result_size; |
330 | results = kmalloc(new_count * sizeof(struct hfa384x_hostscan_result), | 330 | results = kcalloc(new_count, sizeof(struct hfa384x_hostscan_result), |
331 | GFP_ATOMIC); | 331 | GFP_ATOMIC); |
332 | if (results == NULL) | 332 | if (results == NULL) |
333 | return; | 333 | return; |
334 | memset(results, 0, new_count * sizeof(struct hfa384x_hostscan_result)); | ||
335 | 334 | ||
336 | for (i = 0; i < new_count; i++) { | 335 | for (i = 0; i < new_count; i++) { |
337 | memcpy(&results[i], ptr, copy_len); | 336 | memcpy(&results[i], ptr, copy_len); |
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c index d061fb3443ff..3b7b8063ff1c 100644 --- a/drivers/net/wireless/hostap/hostap_ioctl.c +++ b/drivers/net/wireless/hostap/hostap_ioctl.c | |||
@@ -181,12 +181,10 @@ static int prism2_ioctl_siwencode(struct net_device *dev, | |||
181 | struct ieee80211_crypt_data *new_crypt; | 181 | struct ieee80211_crypt_data *new_crypt; |
182 | 182 | ||
183 | /* take WEP into use */ | 183 | /* take WEP into use */ |
184 | new_crypt = (struct ieee80211_crypt_data *) | 184 | new_crypt = kzalloc(sizeof(struct ieee80211_crypt_data), |
185 | kmalloc(sizeof(struct ieee80211_crypt_data), | ||
186 | GFP_KERNEL); | 185 | GFP_KERNEL); |
187 | if (new_crypt == NULL) | 186 | if (new_crypt == NULL) |
188 | return -ENOMEM; | 187 | return -ENOMEM; |
189 | memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data)); | ||
190 | new_crypt->ops = ieee80211_get_crypto_ops("WEP"); | 188 | new_crypt->ops = ieee80211_get_crypto_ops("WEP"); |
191 | if (!new_crypt->ops) { | 189 | if (!new_crypt->ops) { |
192 | request_module("ieee80211_crypt_wep"); | 190 | request_module("ieee80211_crypt_wep"); |
@@ -3320,14 +3318,12 @@ static int prism2_ioctl_siwencodeext(struct net_device *dev, | |||
3320 | 3318 | ||
3321 | prism2_crypt_delayed_deinit(local, crypt); | 3319 | prism2_crypt_delayed_deinit(local, crypt); |
3322 | 3320 | ||
3323 | new_crypt = (struct ieee80211_crypt_data *) | 3321 | new_crypt = kzalloc(sizeof(struct ieee80211_crypt_data), |
3324 | kmalloc(sizeof(struct ieee80211_crypt_data), | ||
3325 | GFP_KERNEL); | 3322 | GFP_KERNEL); |
3326 | if (new_crypt == NULL) { | 3323 | if (new_crypt == NULL) { |
3327 | ret = -ENOMEM; | 3324 | ret = -ENOMEM; |
3328 | goto done; | 3325 | goto done; |
3329 | } | 3326 | } |
3330 | memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data)); | ||
3331 | new_crypt->ops = ops; | 3327 | new_crypt->ops = ops; |
3332 | new_crypt->priv = new_crypt->ops->init(i); | 3328 | new_crypt->priv = new_crypt->ops->init(i); |
3333 | if (new_crypt->priv == NULL) { | 3329 | if (new_crypt->priv == NULL) { |
@@ -3538,14 +3534,12 @@ static int prism2_ioctl_set_encryption(local_info_t *local, | |||
3538 | 3534 | ||
3539 | prism2_crypt_delayed_deinit(local, crypt); | 3535 | prism2_crypt_delayed_deinit(local, crypt); |
3540 | 3536 | ||
3541 | new_crypt = (struct ieee80211_crypt_data *) | 3537 | new_crypt = kzalloc(sizeof(struct ieee80211_crypt_data), |
3542 | kmalloc(sizeof(struct ieee80211_crypt_data), | ||
3543 | GFP_KERNEL); | 3538 | GFP_KERNEL); |
3544 | if (new_crypt == NULL) { | 3539 | if (new_crypt == NULL) { |
3545 | ret = -ENOMEM; | 3540 | ret = -ENOMEM; |
3546 | goto done; | 3541 | goto done; |
3547 | } | 3542 | } |
3548 | memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data)); | ||
3549 | new_crypt->ops = ops; | 3543 | new_crypt->ops = ops; |
3550 | new_crypt->priv = new_crypt->ops->init(param->u.crypt.idx); | 3544 | new_crypt->priv = new_crypt->ops->init(param->u.crypt.idx); |
3551 | if (new_crypt->priv == NULL) { | 3545 | if (new_crypt->priv == NULL) { |
diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c index d1de9766c831..c4f6020baa9e 100644 --- a/drivers/net/wireless/hostap/hostap_pci.c +++ b/drivers/net/wireless/hostap/hostap_pci.c | |||
@@ -300,10 +300,9 @@ static int prism2_pci_probe(struct pci_dev *pdev, | |||
300 | struct hostap_interface *iface; | 300 | struct hostap_interface *iface; |
301 | struct hostap_pci_priv *hw_priv; | 301 | struct hostap_pci_priv *hw_priv; |
302 | 302 | ||
303 | hw_priv = kmalloc(sizeof(*hw_priv), GFP_KERNEL); | 303 | hw_priv = kzalloc(sizeof(*hw_priv), GFP_KERNEL); |
304 | if (hw_priv == NULL) | 304 | if (hw_priv == NULL) |
305 | return -ENOMEM; | 305 | return -ENOMEM; |
306 | memset(hw_priv, 0, sizeof(*hw_priv)); | ||
307 | 306 | ||
308 | if (pci_enable_device(pdev)) | 307 | if (pci_enable_device(pdev)) |
309 | goto err_out_free; | 308 | goto err_out_free; |
diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c index bc81b13a5a2a..e235e0647897 100644 --- a/drivers/net/wireless/hostap/hostap_plx.c +++ b/drivers/net/wireless/hostap/hostap_plx.c | |||
@@ -447,10 +447,9 @@ static int prism2_plx_probe(struct pci_dev *pdev, | |||
447 | int tmd7160; | 447 | int tmd7160; |
448 | struct hostap_plx_priv *hw_priv; | 448 | struct hostap_plx_priv *hw_priv; |
449 | 449 | ||
450 | hw_priv = kmalloc(sizeof(*hw_priv), GFP_KERNEL); | 450 | hw_priv = kzalloc(sizeof(*hw_priv), GFP_KERNEL); |
451 | if (hw_priv == NULL) | 451 | if (hw_priv == NULL) |
452 | return -ENOMEM; | 452 | return -ENOMEM; |
453 | memset(hw_priv, 0, sizeof(*hw_priv)); | ||
454 | 453 | ||
455 | if (pci_enable_device(pdev)) | 454 | if (pci_enable_device(pdev)) |
456 | goto err_out_free; | 455 | goto err_out_free; |