Commit 4c82bf8e authored by Pavel Roskin's avatar Pavel Roskin Committed by John W. Linville

mac80211: reduce stack usage in sta_ht_capa_read()

The maximal size of the "ht_capa" file is 430 bytes.  In most cases,
it's much shorter.  Use a 512 byte long buffer.  1024 bytes is too much
and causes a warning with CONFIG_FRAME_WARN=1024.
Signed-off-by: default avatarPavel Roskin <proski@gnu.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9501fefe
...@@ -165,7 +165,7 @@ static ssize_t sta_ht_capa_read(struct file *file, char __user *userbuf, ...@@ -165,7 +165,7 @@ static ssize_t sta_ht_capa_read(struct file *file, char __user *userbuf,
if (_cond) \ if (_cond) \
p += scnprintf(p, sizeof(buf)+buf-p, "\t" _str "\n"); \ p += scnprintf(p, sizeof(buf)+buf-p, "\t" _str "\n"); \
} while (0) } while (0)
char buf[1024], *p = buf; char buf[512], *p = buf;
int i; int i;
struct sta_info *sta = file->private_data; struct sta_info *sta = file->private_data;
struct ieee80211_sta_ht_cap *htc = &sta->sta.ht_cap; struct ieee80211_sta_ht_cap *htc = &sta->sta.ht_cap;
......
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