- Dec 18, 2019
-
-
Jérôme Pouiller authored
Update the TODO list of wfx driver with a more precise list of items. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-56-Jerome.Pouiller@silabs.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
The device provides an API to abort a scan request. Expose this feature to mac80211. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-55-Jerome.Pouiller@silabs.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Original code allows to detect an BSS loss during a scan and delaying the handling of BSS loss. However, there it is no real problem to just make these two events mutually exclusive (there is just a performance penalty). Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-54-Jerome.Pouiller@silabs.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Original code allows to detect an unjoin request during a scan and delaying the unjoin request. However, it is far easier to just block the unjoin request until the end of the scan request. In fact, it is already the case since scan and unjoin are protected by conf_mutex. So, currently, the handling of delayed_unjoin is just dead code. Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-53-Jerome.Pouiller@silabs.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
mac80211 specification does not forbid hw_scan() to call ieee80211_scan_completed(). However, from userspace point of view, not all applications support this behavior. In particular, the code of iw contains a big fat warning: /* * This code has a bug, which requires creating a separate * nl80211 socket to fix: * It is possible for a NL80211_CMD_NEW_SCAN_RESULTS or * NL80211_CMD_SCAN_ABORTED message to be sent by the kernel * before (!) we listen to it, because we only start listening * after we send our scan request. [...] * Alas, the kernel doesn't do that (yet). */ So, we have to avoid to call ieee80211_scan_completed() from hw_scan() (it's a kind of unwritten rule). This patch relocates the hw_scan() process to a work_struct to fix the problem. Signed-off-by:Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-52-Jerome.Pouiller@silabs.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Scan requests from mac80211 must be splitted in a few hardware requests (it is necessary to split channels with active scan and channels with passive scan). Current code schedules a work_struct for each hardware request and one delayed_work to handle scan timeout. It is far simpler to run send all the hardware requests synchronously and replace delayed_work with a simple wait_for_completion_timeout(). Signed-off-by:
Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-51-Jerome.Pouiller@silabs.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-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.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-