Skip to content

Commit a083429

Browse files
lucacoelhoKalle Valo
authored andcommitted
iwlwifi: mvm: fix old scan version sizes
When version 8 of the scan command API was introduced, only the size of version 7 was updated, causing older versions of the firmware to throw BAD_COMMAND errors. Calculating the old version based on the size of the latest version got too complicated and the size of the older versions will never change anyway, so it's better to just hardcoded the sizes. Fixes: 66fa242 ("iwlwifi: fw api: support the new scan request FW API version") Reported-by: Scott Register <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent 77e30e1 commit a083429

File tree

1 file changed

+5
-8
lines changed
  • drivers/net/wireless/intel/iwlwifi/fw/api

1 file changed

+5
-8
lines changed

drivers/net/wireless/intel/iwlwifi/fw/api/scan.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
99
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
1010
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
11+
* Copyright(c) 2018 Intel Corporation
1112
*
1213
* This program is free software; you can redistribute it and/or modify
1314
* it under the terms of version 2 of the GNU General Public License as
@@ -30,7 +31,7 @@
3031
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
3132
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
3233
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
33-
* Copyright(c) 2018 Intel Corporation
34+
* Copyright(c) 2018 Intel Corporation
3435
* All rights reserved.
3536
*
3637
* Redistribution and use in source and binary forms, with or without
@@ -749,13 +750,9 @@ struct iwl_scan_req_umac {
749750
} __packed;
750751

751752
#define IWL_SCAN_REQ_UMAC_SIZE_V8 sizeof(struct iwl_scan_req_umac)
752-
#define IWL_SCAN_REQ_UMAC_SIZE_V7 (sizeof(struct iwl_scan_req_umac) - \
753-
4 * sizeof(u8))
754-
#define IWL_SCAN_REQ_UMAC_SIZE_V6 (sizeof(struct iwl_scan_req_umac) - \
755-
2 * sizeof(u8) - sizeof(__le16))
756-
#define IWL_SCAN_REQ_UMAC_SIZE_V1 (sizeof(struct iwl_scan_req_umac) - \
757-
2 * sizeof(__le32) - 2 * sizeof(u8) - \
758-
sizeof(__le16))
753+
#define IWL_SCAN_REQ_UMAC_SIZE_V7 48
754+
#define IWL_SCAN_REQ_UMAC_SIZE_V6 44
755+
#define IWL_SCAN_REQ_UMAC_SIZE_V1 36
759756

760757
/**
761758
* struct iwl_umac_scan_abort

0 commit comments

Comments
 (0)