> This separation would not allow to do a proper device configuration as
> first stage needs to use information from IEs that are processed on
> a second stage. Which means first and second stages have to be meged.
> In that case there is no point anymore to keep third stage either, so
> merge all three into a single command.
typo in commit message: 'meged'
> + if (len > (sizeof(struct qlink_cmd) + QTNF_MAX_CMD_BUF_SIZE)) {
> + pr_err("VIF%u.%u: can not fit AP settings: %u\n",
> + vif->mac->macid, vif->vifid, len);
> + return false;
> }
Initial len value is sizeof(struct qlink_cmd_start_ap), qlink_cmd is a part
of qlink_cmd_start_ap. So this check has to be fixed. It looks like the
simplest option is only to check payload: set initial len value to 0
and drop sizeof in comparison.