diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-07 22:54:48 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-07 22:54:48 -0500 |
commit | 3133c5e896c0b2509e72ae0c2cb9452c80d47f46 (patch) | |
tree | ae8af7e85d0a7c402cca7d31eac2935897e1d698 /drivers/net/wireless/airo.c | |
parent | 6b995751c2e851d2bc9c277b5884d0adb519e31d (diff) | |
parent | b69a3aa85cb7bda2eb6c5932a62c1337d0d6612c (diff) |
Merge git://git.tuxdriver.com/git/netdev-jwl
Diffstat (limited to 'drivers/net/wireless/airo.c')
-rw-r--r-- | drivers/net/wireless/airo.c | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 6afc6e5dee9b..340ab4ee4b67 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -4535,9 +4535,8 @@ static int proc_status_open( struct inode *inode, struct file *file ) { | |||
4535 | StatusRid status_rid; | 4535 | StatusRid status_rid; |
4536 | int i; | 4536 | int i; |
4537 | 4537 | ||
4538 | if ((file->private_data = kmalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) | 4538 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) |
4539 | return -ENOMEM; | 4539 | return -ENOMEM; |
4540 | memset(file->private_data, 0, sizeof(struct proc_data)); | ||
4541 | data = (struct proc_data *)file->private_data; | 4540 | data = (struct proc_data *)file->private_data; |
4542 | if ((data->rbuffer = kmalloc( 2048, GFP_KERNEL )) == NULL) { | 4541 | if ((data->rbuffer = kmalloc( 2048, GFP_KERNEL )) == NULL) { |
4543 | kfree (file->private_data); | 4542 | kfree (file->private_data); |
@@ -4615,9 +4614,8 @@ static int proc_stats_rid_open( struct inode *inode, | |||
4615 | int i, j; | 4614 | int i, j; |
4616 | u32 *vals = stats.vals; | 4615 | u32 *vals = stats.vals; |
4617 | 4616 | ||
4618 | if ((file->private_data = kmalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) | 4617 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) |
4619 | return -ENOMEM; | 4618 | return -ENOMEM; |
4620 | memset(file->private_data, 0, sizeof(struct proc_data)); | ||
4621 | data = (struct proc_data *)file->private_data; | 4619 | data = (struct proc_data *)file->private_data; |
4622 | if ((data->rbuffer = kmalloc( 4096, GFP_KERNEL )) == NULL) { | 4620 | if ((data->rbuffer = kmalloc( 4096, GFP_KERNEL )) == NULL) { |
4623 | kfree (file->private_data); | 4621 | kfree (file->private_data); |
@@ -4881,20 +4879,18 @@ static int proc_config_open( struct inode *inode, struct file *file ) { | |||
4881 | struct airo_info *ai = dev->priv; | 4879 | struct airo_info *ai = dev->priv; |
4882 | int i; | 4880 | int i; |
4883 | 4881 | ||
4884 | if ((file->private_data = kmalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) | 4882 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) |
4885 | return -ENOMEM; | 4883 | return -ENOMEM; |
4886 | memset(file->private_data, 0, sizeof(struct proc_data)); | ||
4887 | data = (struct proc_data *)file->private_data; | 4884 | data = (struct proc_data *)file->private_data; |
4888 | if ((data->rbuffer = kmalloc( 2048, GFP_KERNEL )) == NULL) { | 4885 | if ((data->rbuffer = kmalloc( 2048, GFP_KERNEL )) == NULL) { |
4889 | kfree (file->private_data); | 4886 | kfree (file->private_data); |
4890 | return -ENOMEM; | 4887 | return -ENOMEM; |
4891 | } | 4888 | } |
4892 | if ((data->wbuffer = kmalloc( 2048, GFP_KERNEL )) == NULL) { | 4889 | if ((data->wbuffer = kzalloc( 2048, GFP_KERNEL )) == NULL) { |
4893 | kfree (data->rbuffer); | 4890 | kfree (data->rbuffer); |
4894 | kfree (file->private_data); | 4891 | kfree (file->private_data); |
4895 | return -ENOMEM; | 4892 | return -ENOMEM; |
4896 | } | 4893 | } |
4897 | memset( data->wbuffer, 0, 2048 ); | ||
4898 | data->maxwritelen = 2048; | 4894 | data->maxwritelen = 2048; |
4899 | data->on_close = proc_config_on_close; | 4895 | data->on_close = proc_config_on_close; |
4900 | 4896 | ||
@@ -5155,24 +5151,21 @@ static int proc_wepkey_open( struct inode *inode, struct file *file ) { | |||
5155 | int j=0; | 5151 | int j=0; |
5156 | int rc; | 5152 | int rc; |
5157 | 5153 | ||
5158 | if ((file->private_data = kmalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) | 5154 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) |
5159 | return -ENOMEM; | 5155 | return -ENOMEM; |
5160 | memset(file->private_data, 0, sizeof(struct proc_data)); | ||
5161 | memset(&wkr, 0, sizeof(wkr)); | 5156 | memset(&wkr, 0, sizeof(wkr)); |
5162 | data = (struct proc_data *)file->private_data; | 5157 | data = (struct proc_data *)file->private_data; |
5163 | if ((data->rbuffer = kmalloc( 180, GFP_KERNEL )) == NULL) { | 5158 | if ((data->rbuffer = kzalloc( 180, GFP_KERNEL )) == NULL) { |
5164 | kfree (file->private_data); | 5159 | kfree (file->private_data); |
5165 | return -ENOMEM; | 5160 | return -ENOMEM; |
5166 | } | 5161 | } |
5167 | memset(data->rbuffer, 0, 180); | ||
5168 | data->writelen = 0; | 5162 | data->writelen = 0; |
5169 | data->maxwritelen = 80; | 5163 | data->maxwritelen = 80; |
5170 | if ((data->wbuffer = kmalloc( 80, GFP_KERNEL )) == NULL) { | 5164 | if ((data->wbuffer = kzalloc( 80, GFP_KERNEL )) == NULL) { |
5171 | kfree (data->rbuffer); | 5165 | kfree (data->rbuffer); |
5172 | kfree (file->private_data); | 5166 | kfree (file->private_data); |
5173 | return -ENOMEM; | 5167 | return -ENOMEM; |
5174 | } | 5168 | } |
5175 | memset( data->wbuffer, 0, 80 ); | ||
5176 | data->on_close = proc_wepkey_on_close; | 5169 | data->on_close = proc_wepkey_on_close; |
5177 | 5170 | ||
5178 | ptr = data->rbuffer; | 5171 | ptr = data->rbuffer; |
@@ -5203,9 +5196,8 @@ static int proc_SSID_open( struct inode *inode, struct file *file ) { | |||
5203 | char *ptr; | 5196 | char *ptr; |
5204 | SsidRid SSID_rid; | 5197 | SsidRid SSID_rid; |
5205 | 5198 | ||
5206 | if ((file->private_data = kmalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) | 5199 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) |
5207 | return -ENOMEM; | 5200 | return -ENOMEM; |
5208 | memset(file->private_data, 0, sizeof(struct proc_data)); | ||
5209 | data = (struct proc_data *)file->private_data; | 5201 | data = (struct proc_data *)file->private_data; |
5210 | if ((data->rbuffer = kmalloc( 104, GFP_KERNEL )) == NULL) { | 5202 | if ((data->rbuffer = kmalloc( 104, GFP_KERNEL )) == NULL) { |
5211 | kfree (file->private_data); | 5203 | kfree (file->private_data); |
@@ -5213,12 +5205,11 @@ static int proc_SSID_open( struct inode *inode, struct file *file ) { | |||
5213 | } | 5205 | } |
5214 | data->writelen = 0; | 5206 | data->writelen = 0; |
5215 | data->maxwritelen = 33*3; | 5207 | data->maxwritelen = 33*3; |
5216 | if ((data->wbuffer = kmalloc( 33*3, GFP_KERNEL )) == NULL) { | 5208 | if ((data->wbuffer = kzalloc( 33*3, GFP_KERNEL )) == NULL) { |
5217 | kfree (data->rbuffer); | 5209 | kfree (data->rbuffer); |
5218 | kfree (file->private_data); | 5210 | kfree (file->private_data); |
5219 | return -ENOMEM; | 5211 | return -ENOMEM; |
5220 | } | 5212 | } |
5221 | memset( data->wbuffer, 0, 33*3 ); | ||
5222 | data->on_close = proc_SSID_on_close; | 5213 | data->on_close = proc_SSID_on_close; |
5223 | 5214 | ||
5224 | readSsidRid(ai, &SSID_rid); | 5215 | readSsidRid(ai, &SSID_rid); |
@@ -5247,9 +5238,8 @@ static int proc_APList_open( struct inode *inode, struct file *file ) { | |||
5247 | char *ptr; | 5238 | char *ptr; |
5248 | APListRid APList_rid; | 5239 | APListRid APList_rid; |
5249 | 5240 | ||
5250 | if ((file->private_data = kmalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) | 5241 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) |
5251 | return -ENOMEM; | 5242 | return -ENOMEM; |
5252 | memset(file->private_data, 0, sizeof(struct proc_data)); | ||
5253 | data = (struct proc_data *)file->private_data; | 5243 | data = (struct proc_data *)file->private_data; |
5254 | if ((data->rbuffer = kmalloc( 104, GFP_KERNEL )) == NULL) { | 5244 | if ((data->rbuffer = kmalloc( 104, GFP_KERNEL )) == NULL) { |
5255 | kfree (file->private_data); | 5245 | kfree (file->private_data); |
@@ -5257,12 +5247,11 @@ static int proc_APList_open( struct inode *inode, struct file *file ) { | |||
5257 | } | 5247 | } |
5258 | data->writelen = 0; | 5248 | data->writelen = 0; |
5259 | data->maxwritelen = 4*6*3; | 5249 | data->maxwritelen = 4*6*3; |
5260 | if ((data->wbuffer = kmalloc( data->maxwritelen, GFP_KERNEL )) == NULL) { | 5250 | if ((data->wbuffer = kzalloc( data->maxwritelen, GFP_KERNEL )) == NULL) { |
5261 | kfree (data->rbuffer); | 5251 | kfree (data->rbuffer); |
5262 | kfree (file->private_data); | 5252 | kfree (file->private_data); |
5263 | return -ENOMEM; | 5253 | return -ENOMEM; |
5264 | } | 5254 | } |
5265 | memset( data->wbuffer, 0, data->maxwritelen ); | ||
5266 | data->on_close = proc_APList_on_close; | 5255 | data->on_close = proc_APList_on_close; |
5267 | 5256 | ||
5268 | readAPListRid(ai, &APList_rid); | 5257 | readAPListRid(ai, &APList_rid); |
@@ -5297,9 +5286,8 @@ static int proc_BSSList_open( struct inode *inode, struct file *file ) { | |||
5297 | /* If doLoseSync is not 1, we won't do a Lose Sync */ | 5286 | /* If doLoseSync is not 1, we won't do a Lose Sync */ |
5298 | int doLoseSync = -1; | 5287 | int doLoseSync = -1; |
5299 | 5288 | ||
5300 | if ((file->private_data = kmalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) | 5289 | if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) |
5301 | return -ENOMEM; | 5290 | return -ENOMEM; |
5302 | memset(file->private_data, 0, sizeof(struct proc_data)); | ||
5303 | data = (struct proc_data *)file->private_data; | 5291 | data = (struct proc_data *)file->private_data; |
5304 | if ((data->rbuffer = kmalloc( 1024, GFP_KERNEL )) == NULL) { | 5292 | if ((data->rbuffer = kmalloc( 1024, GFP_KERNEL )) == NULL) { |
5305 | kfree (file->private_data); | 5293 | kfree (file->private_data); |