diff options
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 2222ce08ee91..ec83f413a7ed 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -3294,8 +3294,6 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) | |||
3294 | struct cfg80211_registered_device *rdev = info->user_ptr[0]; | 3294 | struct cfg80211_registered_device *rdev = info->user_ptr[0]; |
3295 | struct net_device *dev = info->user_ptr[1]; | 3295 | struct net_device *dev = info->user_ptr[1]; |
3296 | struct cfg80211_scan_request *request; | 3296 | struct cfg80211_scan_request *request; |
3297 | struct cfg80211_ssid *ssid; | ||
3298 | struct ieee80211_channel *channel; | ||
3299 | struct nlattr *attr; | 3297 | struct nlattr *attr; |
3300 | struct wiphy *wiphy; | 3298 | struct wiphy *wiphy; |
3301 | int err, tmp, n_ssids = 0, n_channels, i; | 3299 | int err, tmp, n_ssids = 0, n_channels, i; |
@@ -3342,8 +3340,8 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) | |||
3342 | return -EINVAL; | 3340 | return -EINVAL; |
3343 | 3341 | ||
3344 | request = kzalloc(sizeof(*request) | 3342 | request = kzalloc(sizeof(*request) |
3345 | + sizeof(*ssid) * n_ssids | 3343 | + sizeof(*request->ssids) * n_ssids |
3346 | + sizeof(channel) * n_channels | 3344 | + sizeof(*request->channels) * n_channels |
3347 | + ie_len, GFP_KERNEL); | 3345 | + ie_len, GFP_KERNEL); |
3348 | if (!request) | 3346 | if (!request) |
3349 | return -ENOMEM; | 3347 | return -ENOMEM; |
@@ -3449,8 +3447,6 @@ static int nl80211_start_sched_scan(struct sk_buff *skb, | |||
3449 | struct cfg80211_sched_scan_request *request; | 3447 | struct cfg80211_sched_scan_request *request; |
3450 | struct cfg80211_registered_device *rdev = info->user_ptr[0]; | 3448 | struct cfg80211_registered_device *rdev = info->user_ptr[0]; |
3451 | struct net_device *dev = info->user_ptr[1]; | 3449 | struct net_device *dev = info->user_ptr[1]; |
3452 | struct cfg80211_ssid *ssid; | ||
3453 | struct ieee80211_channel *channel; | ||
3454 | struct nlattr *attr; | 3450 | struct nlattr *attr; |
3455 | struct wiphy *wiphy; | 3451 | struct wiphy *wiphy; |
3456 | int err, tmp, n_ssids = 0, n_channels, i; | 3452 | int err, tmp, n_ssids = 0, n_channels, i; |
@@ -3507,8 +3503,8 @@ static int nl80211_start_sched_scan(struct sk_buff *skb, | |||
3507 | return -EINVAL; | 3503 | return -EINVAL; |
3508 | 3504 | ||
3509 | request = kzalloc(sizeof(*request) | 3505 | request = kzalloc(sizeof(*request) |
3510 | + sizeof(*ssid) * n_ssids | 3506 | + sizeof(*request->ssids) * n_ssids |
3511 | + sizeof(channel) * n_channels | 3507 | + sizeof(*request->channels) * n_channels |
3512 | + ie_len, GFP_KERNEL); | 3508 | + ie_len, GFP_KERNEL); |
3513 | if (!request) | 3509 | if (!request) |
3514 | return -ENOMEM; | 3510 | return -ENOMEM; |