Skip to content

Commit

Permalink
wext: include wireless event id when it has a size problem
Browse files Browse the repository at this point in the history
The wext code checks is the event data is within size limits.
When this check fails a message is logged with violating size.
This patch adds the event id to put us on the right track for
resolving that violation.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Arend van Spriel authored and Johannes Berg committed Sep 5, 2012
1 parent 00ea6de commit e5f5b2f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/wireless/wext-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,13 +478,13 @@ void wireless_send_event(struct net_device * dev,
if (descr->header_type == IW_HEADER_TYPE_POINT) {
/* Check if number of token fits within bounds */
if (wrqu->data.length > descr->max_tokens) {
netdev_err(dev, "(WE) : Wireless Event too big (%d)\n",
wrqu->data.length);
netdev_err(dev, "(WE) : Wireless Event (cmd=0x%04X) too big (%d)\n",
cmd, wrqu->data.length);
return;
}
if (wrqu->data.length < descr->min_tokens) {
netdev_err(dev, "(WE) : Wireless Event too small (%d)\n",
wrqu->data.length);
netdev_err(dev, "(WE) : Wireless Event (cmd=0x%04X) too small (%d)\n",
cmd, wrqu->data.length);
return;
}
/* Calculate extra_len - extra is NULL for restricted events */
Expand Down

0 comments on commit e5f5b2f

Please sign in to comment.