Skip to content

Commit 2f32414

Browse files
committed
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: Johannes Berg <[email protected]>
2 parents 2d6c717 + 838c7b8 commit 2f32414

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

drivers/net/wireless/intel/iwlwifi/iwl-drv.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,7 +1478,6 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
14781478
size_t trigger_tlv_sz[FW_DBG_TRIGGER_MAX];
14791479
u32 api_ver;
14801480
int i;
1481-
bool load_module = false;
14821481
bool usniffer_images = false;
14831482
bool failure = true;
14841483

@@ -1726,19 +1725,12 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
17261725
goto out_unbind;
17271726
}
17281727
} else {
1729-
load_module = true;
1728+
request_module_nowait("%s", op->name);
17301729
}
17311730
mutex_unlock(&iwlwifi_opmode_table_mtx);
17321731

17331732
complete(&drv->request_firmware_complete);
17341733

1735-
/*
1736-
* Load the module last so we don't block anything
1737-
* else from proceeding if the module fails to load
1738-
* or hangs loading.
1739-
*/
1740-
if (load_module)
1741-
request_module("%s", op->name);
17421734
failure = false;
17431735
goto free;
17441736

net/wireless/nl80211.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9163,6 +9163,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
91639163
struct wiphy *wiphy;
91649164
int err, tmp, n_ssids = 0, n_channels, i;
91659165
size_t ie_len, size;
9166+
size_t ssids_offset, ie_offset;
91669167

91679168
wiphy = &rdev->wiphy;
91689169

@@ -9208,21 +9209,20 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
92089209
return -EINVAL;
92099210

92109211
size = struct_size(request, channels, n_channels);
9212+
ssids_offset = size;
92119213
size = size_add(size, array_size(sizeof(*request->ssids), n_ssids));
9214+
ie_offset = size;
92129215
size = size_add(size, ie_len);
92139216
request = kzalloc(size, GFP_KERNEL);
92149217
if (!request)
92159218
return -ENOMEM;
9219+
request->n_channels = n_channels;
92169220

92179221
if (n_ssids)
9218-
request->ssids = (void *)&request->channels[n_channels];
9222+
request->ssids = (void *)request + ssids_offset;
92199223
request->n_ssids = n_ssids;
9220-
if (ie_len) {
9221-
if (n_ssids)
9222-
request->ie = (void *)(request->ssids + n_ssids);
9223-
else
9224-
request->ie = (void *)(request->channels + n_channels);
9225-
}
9224+
if (ie_len)
9225+
request->ie = (void *)request + ie_offset;
92269226

92279227
i = 0;
92289228
if (scan_freqs) {

0 commit comments

Comments
 (0)