Commit 998a5a7d authored by Frank Seidel's avatar Frank Seidel Committed by John W. Linville

airo: reduce stack memory footprint

Applying kernel janitors todos (reduce stack
footprint where possible) to airo wireless driver.
(Before 1124 bytes on i386, now 876)
Signed-off-by: default avatarFrank Seidel <frank@f-seidel.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b837e606
...@@ -7148,11 +7148,15 @@ static int airo_get_aplist(struct net_device *dev, ...@@ -7148,11 +7148,15 @@ static int airo_get_aplist(struct net_device *dev,
{ {
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
struct sockaddr *address = (struct sockaddr *) extra; struct sockaddr *address = (struct sockaddr *) extra;
struct iw_quality qual[IW_MAX_AP]; struct iw_quality *qual;
BSSListRid BSSList; BSSListRid BSSList;
int i; int i;
int loseSync = capable(CAP_NET_ADMIN) ? 1: -1; 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++) { for (i = 0; i < IW_MAX_AP; i++) {
u16 dBm; u16 dBm;
if (readBSSListRid(local, loseSync, &BSSList)) if (readBSSListRid(local, loseSync, &BSSList))
...@@ -7207,6 +7211,7 @@ static int airo_get_aplist(struct net_device *dev, ...@@ -7207,6 +7211,7 @@ static int airo_get_aplist(struct net_device *dev,
} }
dwrq->length = i; dwrq->length = i;
kfree(qual);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment