diff options
Diffstat (limited to 'drivers/net/wireless/prism54/isl_ioctl.c')
-rw-r--r-- | drivers/net/wireless/prism54/isl_ioctl.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index 4a20e45de3ca..96606ed10076 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c | |||
@@ -157,8 +157,9 @@ prism54_mib_init(islpci_private *priv) | |||
157 | * schedule_work(), thus we can as well use sleeping semaphore | 157 | * schedule_work(), thus we can as well use sleeping semaphore |
158 | * locking */ | 158 | * locking */ |
159 | void | 159 | void |
160 | prism54_update_stats(islpci_private *priv) | 160 | prism54_update_stats(struct work_struct *work) |
161 | { | 161 | { |
162 | islpci_private *priv = container_of(work, islpci_private, stats_work); | ||
162 | char *data; | 163 | char *data; |
163 | int j; | 164 | int j; |
164 | struct obj_bss bss, *bss2; | 165 | struct obj_bss bss, *bss2; |
@@ -2140,11 +2141,9 @@ prism54_wpa_bss_ie_add(islpci_private *priv, u8 *bssid, | |||
2140 | struct islpci_bss_wpa_ie, list); | 2141 | struct islpci_bss_wpa_ie, list); |
2141 | list_del(&bss->list); | 2142 | list_del(&bss->list); |
2142 | } else { | 2143 | } else { |
2143 | bss = kmalloc(sizeof (*bss), GFP_ATOMIC); | 2144 | bss = kzalloc(sizeof (*bss), GFP_ATOMIC); |
2144 | if (bss != NULL) { | 2145 | if (bss != NULL) |
2145 | priv->num_bss_wpa++; | 2146 | priv->num_bss_wpa++; |
2146 | memset(bss, 0, sizeof (*bss)); | ||
2147 | } | ||
2148 | } | 2147 | } |
2149 | if (bss != NULL) { | 2148 | if (bss != NULL) { |
2150 | memcpy(bss->bssid, bssid, ETH_ALEN); | 2149 | memcpy(bss->bssid, bssid, ETH_ALEN); |
@@ -2493,9 +2492,10 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid, | |||
2493 | * interrupt context, no locks held. | 2492 | * interrupt context, no locks held. |
2494 | */ | 2493 | */ |
2495 | void | 2494 | void |
2496 | prism54_process_trap(void *data) | 2495 | prism54_process_trap(struct work_struct *work) |
2497 | { | 2496 | { |
2498 | struct islpci_mgmtframe *frame = data; | 2497 | struct islpci_mgmtframe *frame = |
2498 | container_of(work, struct islpci_mgmtframe, ws); | ||
2499 | struct net_device *ndev = frame->ndev; | 2499 | struct net_device *ndev = frame->ndev; |
2500 | enum oid_num_t n = mgt_oidtonum(frame->header->oid); | 2500 | enum oid_num_t n = mgt_oidtonum(frame->header->oid); |
2501 | 2501 | ||
@@ -2684,11 +2684,10 @@ prism2_ioctl_set_generic_element(struct net_device *ndev, | |||
2684 | return -EINVAL; | 2684 | return -EINVAL; |
2685 | 2685 | ||
2686 | alen = sizeof(*attach) + len; | 2686 | alen = sizeof(*attach) + len; |
2687 | attach = kmalloc(alen, GFP_KERNEL); | 2687 | attach = kzalloc(alen, GFP_KERNEL); |
2688 | if (attach == NULL) | 2688 | if (attach == NULL) |
2689 | return -ENOMEM; | 2689 | return -ENOMEM; |
2690 | 2690 | ||
2691 | memset(attach, 0, alen); | ||
2692 | #define WLAN_FC_TYPE_MGMT 0 | 2691 | #define WLAN_FC_TYPE_MGMT 0 |
2693 | #define WLAN_FC_STYPE_ASSOC_REQ 0 | 2692 | #define WLAN_FC_STYPE_ASSOC_REQ 0 |
2694 | #define WLAN_FC_STYPE_REASSOC_REQ 2 | 2693 | #define WLAN_FC_STYPE_REASSOC_REQ 2 |