diff options
Diffstat (limited to 'drivers/net/wireless/hostap')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_ap.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_hw.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_ioctl.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_pci.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_plx.c | 13 |
6 files changed, 15 insertions, 18 deletions
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c index 753a1de6664b..06c3fa32b310 100644 --- a/drivers/net/wireless/hostap/hostap_ap.c +++ b/drivers/net/wireless/hostap/hostap_ap.c | |||
@@ -3141,7 +3141,7 @@ int hostap_add_sta(struct ap_data *ap, u8 *sta_addr) | |||
3141 | if (ret == 1) { | 3141 | if (ret == 1) { |
3142 | sta = ap_add_sta(ap, sta_addr); | 3142 | sta = ap_add_sta(ap, sta_addr); |
3143 | if (!sta) | 3143 | if (!sta) |
3144 | ret = -1; | 3144 | return -1; |
3145 | sta->flags = WLAN_STA_AUTH | WLAN_STA_ASSOC; | 3145 | sta->flags = WLAN_STA_AUTH | WLAN_STA_ASSOC; |
3146 | sta->ap = 1; | 3146 | sta->ap = 1; |
3147 | memset(sta->supported_rates, 0, sizeof(sta->supported_rates)); | 3147 | memset(sta->supported_rates, 0, sizeof(sta->supported_rates)); |
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index f8f4503475f9..d335b250923a 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -585,8 +585,6 @@ static int prism2_config(dev_link_t *link) | |||
585 | parse = kmalloc(sizeof(cisparse_t), GFP_KERNEL); | 585 | parse = kmalloc(sizeof(cisparse_t), GFP_KERNEL); |
586 | hw_priv = kmalloc(sizeof(*hw_priv), GFP_KERNEL); | 586 | hw_priv = kmalloc(sizeof(*hw_priv), GFP_KERNEL); |
587 | if (parse == NULL || hw_priv == NULL) { | 587 | if (parse == NULL || hw_priv == NULL) { |
588 | kfree(parse); | ||
589 | kfree(hw_priv); | ||
590 | ret = -ENOMEM; | 588 | ret = -ENOMEM; |
591 | goto failed; | 589 | goto failed; |
592 | } | 590 | } |
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index b1f142d9e232..328e9a1d13b5 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -928,15 +928,15 @@ static int hfa384x_set_rid(struct net_device *dev, u16 rid, void *buf, int len) | |||
928 | 928 | ||
929 | res = hfa384x_cmd(dev, HFA384X_CMDCODE_ACCESS_WRITE, rid, NULL, NULL); | 929 | res = hfa384x_cmd(dev, HFA384X_CMDCODE_ACCESS_WRITE, rid, NULL, NULL); |
930 | up(&local->rid_bap_sem); | 930 | up(&local->rid_bap_sem); |
931 | |||
931 | if (res) { | 932 | if (res) { |
932 | printk(KERN_DEBUG "%s: hfa384x_set_rid: CMDCODE_ACCESS_WRITE " | 933 | printk(KERN_DEBUG "%s: hfa384x_set_rid: CMDCODE_ACCESS_WRITE " |
933 | "failed (res=%d, rid=%04x, len=%d)\n", | 934 | "failed (res=%d, rid=%04x, len=%d)\n", |
934 | dev->name, res, rid, len); | 935 | dev->name, res, rid, len); |
935 | return res; | ||
936 | } | ||
937 | 936 | ||
938 | if (res == -ETIMEDOUT) | 937 | if (res == -ETIMEDOUT) |
939 | prism2_hw_reset(dev); | 938 | prism2_hw_reset(dev); |
939 | } | ||
940 | 940 | ||
941 | return res; | 941 | return res; |
942 | } | 942 | } |
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c index f3e0ce1ee037..8b37e824dfcb 100644 --- a/drivers/net/wireless/hostap/hostap_ioctl.c +++ b/drivers/net/wireless/hostap/hostap_ioctl.c | |||
@@ -3358,10 +3358,6 @@ static int prism2_ioctl_siwencodeext(struct net_device *dev, | |||
3358 | if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) { | 3358 | if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) { |
3359 | if (!sta_ptr) | 3359 | if (!sta_ptr) |
3360 | local->tx_keyidx = i; | 3360 | local->tx_keyidx = i; |
3361 | else if (i) { | ||
3362 | ret = -EINVAL; | ||
3363 | goto done; | ||
3364 | } | ||
3365 | } | 3361 | } |
3366 | 3362 | ||
3367 | 3363 | ||
diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c index 2e85bdced2dd..194f07097581 100644 --- a/drivers/net/wireless/hostap/hostap_pci.c +++ b/drivers/net/wireless/hostap/hostap_pci.c | |||
@@ -307,7 +307,7 @@ static int prism2_pci_probe(struct pci_dev *pdev, | |||
307 | memset(hw_priv, 0, sizeof(*hw_priv)); | 307 | memset(hw_priv, 0, sizeof(*hw_priv)); |
308 | 308 | ||
309 | if (pci_enable_device(pdev)) | 309 | if (pci_enable_device(pdev)) |
310 | return -EIO; | 310 | goto err_out_free; |
311 | 311 | ||
312 | phymem = pci_resource_start(pdev, 0); | 312 | phymem = pci_resource_start(pdev, 0); |
313 | 313 | ||
@@ -368,6 +368,8 @@ static int prism2_pci_probe(struct pci_dev *pdev, | |||
368 | err_out_disable: | 368 | err_out_disable: |
369 | pci_disable_device(pdev); | 369 | pci_disable_device(pdev); |
370 | prism2_free_local_data(dev); | 370 | prism2_free_local_data(dev); |
371 | |||
372 | err_out_free: | ||
371 | kfree(hw_priv); | 373 | kfree(hw_priv); |
372 | 374 | ||
373 | return -ENODEV; | 375 | return -ENODEV; |
diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c index 94fe2449f099..edaaa943eb8f 100644 --- a/drivers/net/wireless/hostap/hostap_plx.c +++ b/drivers/net/wireless/hostap/hostap_plx.c | |||
@@ -368,7 +368,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len, | |||
368 | 368 | ||
369 | switch (cis[pos]) { | 369 | switch (cis[pos]) { |
370 | case CISTPL_CONFIG: | 370 | case CISTPL_CONFIG: |
371 | if (cis[pos + 1] < 1) | 371 | if (cis[pos + 1] < 2) |
372 | goto cis_error; | 372 | goto cis_error; |
373 | rmsz = (cis[pos + 2] & 0x3c) >> 2; | 373 | rmsz = (cis[pos + 2] & 0x3c) >> 2; |
374 | rasz = cis[pos + 2] & 0x03; | 374 | rasz = cis[pos + 2] & 0x03; |
@@ -390,7 +390,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len, | |||
390 | break; | 390 | break; |
391 | 391 | ||
392 | case CISTPL_MANFID: | 392 | case CISTPL_MANFID: |
393 | if (cis[pos + 1] < 4) | 393 | if (cis[pos + 1] < 5) |
394 | goto cis_error; | 394 | goto cis_error; |
395 | manfid1 = cis[pos + 2] + (cis[pos + 3] << 8); | 395 | manfid1 = cis[pos + 2] + (cis[pos + 3] << 8); |
396 | manfid2 = cis[pos + 4] + (cis[pos + 5] << 8); | 396 | manfid2 = cis[pos + 4] + (cis[pos + 5] << 8); |
@@ -452,7 +452,7 @@ static int prism2_plx_probe(struct pci_dev *pdev, | |||
452 | memset(hw_priv, 0, sizeof(*hw_priv)); | 452 | memset(hw_priv, 0, sizeof(*hw_priv)); |
453 | 453 | ||
454 | if (pci_enable_device(pdev)) | 454 | if (pci_enable_device(pdev)) |
455 | return -EIO; | 455 | goto err_out_free; |
456 | 456 | ||
457 | /* National Datacomm NCP130 based on TMD7160, not PLX9052. */ | 457 | /* National Datacomm NCP130 based on TMD7160, not PLX9052. */ |
458 | tmd7160 = (pdev->vendor == 0x15e8) && (pdev->device == 0x0131); | 458 | tmd7160 = (pdev->vendor == 0x15e8) && (pdev->device == 0x0131); |
@@ -567,9 +567,6 @@ static int prism2_plx_probe(struct pci_dev *pdev, | |||
567 | return hostap_hw_ready(dev); | 567 | return hostap_hw_ready(dev); |
568 | 568 | ||
569 | fail: | 569 | fail: |
570 | prism2_free_local_data(dev); | ||
571 | kfree(hw_priv); | ||
572 | |||
573 | if (irq_registered && dev) | 570 | if (irq_registered && dev) |
574 | free_irq(dev->irq, dev); | 571 | free_irq(dev->irq, dev); |
575 | 572 | ||
@@ -577,6 +574,10 @@ static int prism2_plx_probe(struct pci_dev *pdev, | |||
577 | iounmap(attr_mem); | 574 | iounmap(attr_mem); |
578 | 575 | ||
579 | pci_disable_device(pdev); | 576 | pci_disable_device(pdev); |
577 | prism2_free_local_data(dev); | ||
578 | |||
579 | err_out_free: | ||
580 | kfree(hw_priv); | ||
580 | 581 | ||
581 | return -ENODEV; | 582 | return -ENODEV; |
582 | } | 583 | } |