- 18 Dec, 2019 40 commits
-
-
Jérôme Pouiller authored
The structure hif_mib_template_frame come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, the current code for hif_set_template_frame() is dumb. All the difficult task is left to the caller. So, there is code to factorize here. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-50-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Simplify wfx_hw_scan() by splitting out the update of the probe request. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-49-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
The structures hif_req_start_scan and hif_ssid_def come from hardware API. It is not intended to be manipulated in upper layers of the driver. So, this patch relocate handling of theses structures to hif_scan() (the low level function). This change also allows to drop struct wfx_scan_params. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-48-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Since wfx_scan_complete() is now only called from wfx_scan_complete_cb(), it make sense to merge the both functions. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-47-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
The device is not allowed to enter in sleep mode during scan. However, this is already handled by the device. So driver does not have to care about it. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-46-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
If scan fails, status is returned in hif_ind_scan_cmpl. hif_scan always return a success. So, we can simplify the code. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-45-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
The struct hif_req_edca_queue_params comes from hardware API. It is not intended to be manipulated in upper layers of the driver. So, this patch: 1. relocate the handling of this struct in hif_set_edca_queue_params() (the low level function) 2. replace it in wfx_vif by the mac80211 equivalent: struct ieee80211_tx_queue_params Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-44-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
mac80211 already call wfx_conf_tx() on every VIF instanciation. So, the driver does not need to do it. Note that current code did dirty things with wvif->edca_params. This struct was initialized, but only 'queue_id' was really used. The other members are only used to store temporary values. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-43-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Intermediate structure wfx_edca_params does not help. This patch relocates its members directly in struct wfx_vif. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-42-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
The struct hif_req_set_pm_mode comes from hardware API. It is not intended to be manipulated in upper layers of the driver. So, this patch relocate the handling of this struct to hif_set_pm() (the low level function). Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-41-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
It is useless to keep uapsd_info in struct wfx_vif. This structure can be rebuilt just before to be sent. In add, the struct hif_mib_set_uapsd_information comes from hardware API. It is not intended to be manipulated in upper layers of the driver. So, this patch relocates the handling of this struct to hif_set_uapsd_info() (the low level function). Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-40-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
It is easier to manipulate a int than an array of booleans. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-39-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Error management of wfx_conf_tx() can be simplified. In add, the hardware command "hif_set_edca_queue_params" never returns any error. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-38-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Maximum request time (how long a request wait for the medium) is set in firmware to 512TU Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-37-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Current code try to not exchange data with device if it is not necessary. However, it seems that the additional code does not provide any gain. So, we prefer to keep a simpler code. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-36-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Power save status is already available in bss_conf. So there is no reason to keep information duplicated in wvif->powersave_mode. In add, type of wvif->powersave_mode is low level struct made to communicate with device. We would like to limit usage of this kind of struct in upper layers of the driver. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-35-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Condition about wvif->state and wvif->bss_params.aid is already checked at beginning of wfx_update_pm(). Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-34-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Argument to wfx_set_pm() is always wvif->powersave_mode. So, we can simplify it. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-33-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
wfx_set_pm() is now only used by sta.c. It can be declared static. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-32-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
When user try to launch scan while connected, it is necessary to notify the AP that we cannot receive data (using power save mode). Firmware already handles this automatically so the code in the driver is redundant and can be dropped. By edge effect, hack of scan status in wfx_set_pm() is now useless. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-31-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
In the old days, wfx_do_join() could be called from different contexts. Now that wfx_do_join() is called only from one place, it is cleaner to keep lock and unlock of data inside the function. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-30-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Current name "mixed_or_greenfield_type" does not allow to know if "true" means "mixed" of "greenfield". It is possible to use a better name and drop "enum hif_tx_mode". Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-29-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
HIF_PREAMBLE_SHORT_LONG12 is never used. So it is possible to change "preamble_type" into a boolean and drop "enum hif_preamble". Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-28-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
In fact "mode" is a boolean that indicates if IBSS mode is used. This patch fixes the name and uses a more adapted memory representation. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-27-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
The original name did not make any sense. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-26-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
The script that has imported API header has made a mistake "num_i_es". Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-25-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
The script that has imported API headers has made a mistake in "num_of_ssi_ds". Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-24-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
There are no real reason to modify the data received from device. So, let's mark the arguments constant. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-23-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
There is no reason for a trace to change any bit of the argument. So, let's make sure that is the case by declaring the arguments constant. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-22-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
We prefer series of simple boolean conditions than computing bitmasks. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-21-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Attribute "aborted" and argument "aborted" are both booleans. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-20-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
hif_tx.c does not use any struct skb. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-19-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
This new naming allows to save a comment. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-18-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
In wfx driver, when a function is used as a struct member, its name is the name of the member prefixed with "wfx_". This patch apply this rule to wfx_spi_remove(). Also remove the useless comment above the function. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-17-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Obviously, current code can be replaced by IS_ERR_OR_NULL(). Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-16-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
When driver receives an unexpected answer from the device, it shows "unsupported HIF ID". That message does not represent the real error. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-15-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Currently, number of available tx retry policies is checked two times. Only one is sufficient. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-14-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
During chip probing, if error does not come from secure boot (for exemple when firmware has been found), others errors probably appears. It is not necessary to say to user that the error does not come from secure boot. So, drop the message saying "no error reported by secure boot". BTW, we take the opportunity to simplify print_boot_status(). Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-13-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
The chip has now proven that it can run at 50MHz on any boards without any problem. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-12-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
The driver checks that the number of retries made by the device is coherent with the rate policy. However, this check make sense only if the device has returned RETRY_EXCEEDED. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-11-Jerome.Pouiller@silabs.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-