Commit 2f324144 authored by Johannes Berg's avatar Johannes Berg

Merge wireless into wireless-next

Given how late we are in the cycle, merge the two fixes from
wireless into wireless-next as they don't see that urgent.
This way, the wireless tree won't need rebasing later.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parents 2d6c7177 838c7b8f
...@@ -1478,7 +1478,6 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context) ...@@ -1478,7 +1478,6 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
size_t trigger_tlv_sz[FW_DBG_TRIGGER_MAX]; size_t trigger_tlv_sz[FW_DBG_TRIGGER_MAX];
u32 api_ver; u32 api_ver;
int i; int i;
bool load_module = false;
bool usniffer_images = false; bool usniffer_images = false;
bool failure = true; bool failure = true;
...@@ -1726,19 +1725,12 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context) ...@@ -1726,19 +1725,12 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
goto out_unbind; goto out_unbind;
} }
} else { } else {
load_module = true; request_module_nowait("%s", op->name);
} }
mutex_unlock(&iwlwifi_opmode_table_mtx); mutex_unlock(&iwlwifi_opmode_table_mtx);
complete(&drv->request_firmware_complete); complete(&drv->request_firmware_complete);
/*
* Load the module last so we don't block anything
* else from proceeding if the module fails to load
* or hangs loading.
*/
if (load_module)
request_module("%s", op->name);
failure = false; failure = false;
goto free; goto free;
......
...@@ -9163,6 +9163,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) ...@@ -9163,6 +9163,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
struct wiphy *wiphy; struct wiphy *wiphy;
int err, tmp, n_ssids = 0, n_channels, i; int err, tmp, n_ssids = 0, n_channels, i;
size_t ie_len, size; size_t ie_len, size;
size_t ssids_offset, ie_offset;
wiphy = &rdev->wiphy; wiphy = &rdev->wiphy;
...@@ -9208,21 +9209,20 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) ...@@ -9208,21 +9209,20 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
return -EINVAL; return -EINVAL;
size = struct_size(request, channels, n_channels); size = struct_size(request, channels, n_channels);
ssids_offset = size;
size = size_add(size, array_size(sizeof(*request->ssids), n_ssids)); size = size_add(size, array_size(sizeof(*request->ssids), n_ssids));
ie_offset = size;
size = size_add(size, ie_len); size = size_add(size, ie_len);
request = kzalloc(size, GFP_KERNEL); request = kzalloc(size, GFP_KERNEL);
if (!request) if (!request)
return -ENOMEM; return -ENOMEM;
request->n_channels = n_channels;
if (n_ssids) if (n_ssids)
request->ssids = (void *)&request->channels[n_channels]; request->ssids = (void *)request + ssids_offset;
request->n_ssids = n_ssids; request->n_ssids = n_ssids;
if (ie_len) { if (ie_len)
if (n_ssids) request->ie = (void *)request + ie_offset;
request->ie = (void *)(request->ssids + n_ssids);
else
request->ie = (void *)(request->channels + n_channels);
}
i = 0; i = 0;
if (scan_freqs) { if (scan_freqs) {
......
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