Applying kernel janitors todos (reduce stack
footprint where possible) to airo wireless driver.
(Before 1124 bytes on i386, now 876)
Signed-off-by: Frank Seidel <frank@f-seidel.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
{
struct airo_info *local = dev->ml_priv;
struct sockaddr *address = (struct sockaddr *) extra;
- struct iw_quality qual[IW_MAX_AP];
+ struct iw_quality *qual;
BSSListRid BSSList;
int i;
int loseSync = capable(CAP_NET_ADMIN) ? 1: -1;
+ qual = kmalloc(IW_MAX_AP * sizeof(*qual), GFP_KERNEL);
+ if (!qual)
+ return -ENOMEM;
+
for (i = 0; i < IW_MAX_AP; i++) {
u16 dBm;
if (readBSSListRid(local, loseSync, &BSSList))
}
dwrq->length = i;
+ kfree(qual);
return 0;
}