iwlwifi: enlarge number of ucode sections
The maximum number of firmware sections is now 32 instead of 16 for a000 devices. Set the appropriate define. Avoid out of bounds access in case there are more sections than the maximum set by driver. Make the driver extensible to FW size changes by allocating the section memory dynamically. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Tento commit je obsažen v:
@@ -163,7 +163,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
|
||||
REGULATORY_DISABLE_BEACON_HINTS;
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
if (priv->fw->img[IWL_UCODE_WOWLAN].sec[0].len &&
|
||||
if (priv->fw->img[IWL_UCODE_WOWLAN].num_sec &&
|
||||
priv->trans->ops->d3_suspend &&
|
||||
priv->trans->ops->d3_resume &&
|
||||
device_can_wakeup(priv->trans->dev)) {
|
||||
|
@@ -407,7 +407,7 @@ int iwl_run_init_ucode(struct iwl_priv *priv)
|
||||
lockdep_assert_held(&priv->mutex);
|
||||
|
||||
/* No init ucode required? Curious, but maybe ok */
|
||||
if (!priv->fw->img[IWL_UCODE_INIT].sec[0].len)
|
||||
if (!priv->fw->img[IWL_UCODE_INIT].num_sec)
|
||||
return 0;
|
||||
|
||||
iwl_init_notification_wait(&priv->notif_wait, &calib_wait,
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele