platform/kernel/linux-rpi.git
4 years agostaging: wfx: simplify wfx_ps_notify_sta()
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:27 +0000 (13:55 +0000)]
staging: wfx: simplify wfx_ps_notify_sta()

wfx_ps_notify_sta() is too complex compared to the task it do.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-59-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify handling of IEEE80211_TX_CTL_SEND_AFTER_DTIM
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:25 +0000 (13:55 +0000)]
staging: wfx: simplify handling of IEEE80211_TX_CTL_SEND_AFTER_DTIM

When mac80211 ask for a frame to be sent after a DTIM, driver should:
  1. Update TIM with multicast bit set (using update_ie). This function
     can be called whenever.
  2. Keep buffered all frames marked "after dtim"
  3. When it receive a suspend_resume indication (see
     wfx_suspend_resume_mc()), send all the buffered frames. This
     indication is sent by the firmware 4ms before the dtim.
  4. If one of the frames returns status "REQUEUE", it means that the
     DTIM period was ended before to be able to send the frame.
  5. When all the buffered frames were sent or if DTIM period was ended,
     driver should update the TIM with multicast bit reset.

All the mess with the asynchronous works can be dropped.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-58-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify wfx_suspend_resume_mc()
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:24 +0000 (13:55 +0000)]
staging: wfx: simplify wfx_suspend_resume_mc()

Indeed, it is not necessary to pass whole hif_ind_suspend_resume_tx to
wfx_suspend_resume_mc().

In add, the structure hif_ind_suspend_resume_tx come from hardware API.
It is not intended to be manipulated in upper layers of the driver.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-57-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: firmware never return PS status for stations
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:22 +0000 (13:55 +0000)]
staging: wfx: firmware never return PS status for stations

At the beginning, firmware could send suspend_resume indication to
notify that a station wake up or sleep down. However, mac80211 already
handles power save status of stations and this behavior has been removed
from the firmware. So now, when suspend_resume indication is received,
it is always to notify that a DTIM is about to be sent.

So, it is possible to simply wfx_suspend_resume().

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-56-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: sta and dtim
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:21 +0000 (13:55 +0000)]
staging: wfx: sta and dtim

wfx_ps_notify() is called for any changes in the TIM. However,
association ID 0 is a very special case that should be handled
independently.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-55-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: pspoll_mask make no sense
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:19 +0000 (13:55 +0000)]
staging: wfx: pspoll_mask make no sense

pspoll_mask is here to send data buffered in driver. But since station
is marked buffered, TIM for this station is 1 and mac80211 will call
sta_notify when a ps-poll is received. So pspoll_mask is useless and
sta_alseep_mask is sufficient.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-54-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: replace wfx_tx_get_tid() with ieee80211_get_tid()
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:18 +0000 (13:55 +0000)]
staging: wfx: replace wfx_tx_get_tid() with ieee80211_get_tid()

wfx_tx_get_tid() was used as a wrapper around ieee80211_get_tid(). It
did sometime return WFX_MAX_TID to ask to upper layers to not include
the frame in "buffered" counter. The objective of this behavior is not
clear, but tests has shown that wfx_tx_get_tid() can be replaced by
ieee80211_get_tid() without any regressions.

BTW, it is not necessary to save the tid in tx_rpiv since it can be
retrieved from the 802.11 header.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-53-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: check that no tx is pending before release sta
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:16 +0000 (13:55 +0000)]
staging: wfx: check that no tx is pending before release sta

Just for sanity.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-52-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify the link-id allocation
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:15 +0000 (13:55 +0000)]
staging: wfx: simplify the link-id allocation

The "link-id" is a slot number provided to the chip. A link-id is
allocated to every station associated with the chip (mainly when the
chip is in AP mode). It is more or less the same thing than the
association ID, but it is limited to 14 values.

Firmware uses the link-id to track the power save status of the
stations.

The current code try to associate a link-id as soon as data are
exchanged with station. It is far easier to rely on sta_add() and
sta_remove().

Until now the value WFX_LINK_ID_NO_ASSOC, was only used when no more
link-id was available. Now, we also use this value for
not-yet-associated stations (that was its primary behavior).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-51-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify wfx_set_tim_impl()
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:13 +0000 (13:55 +0000)]
staging: wfx: simplify wfx_set_tim_impl()

Argument provided to wfx_set_tim_impl() is always wvif->aid0_bit_set and
there is no reason to provide another argument.

Also rename wfx_set_tim_impl() into wfx_update_tim() to reflect the new
behavior.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-50-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: fix RCU usage
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:12 +0000 (13:55 +0000)]
staging: wfx: fix RCU usage

Indeed, sta was used after call to rcu_unlock()

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-49-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: fix bss_loss
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:10 +0000 (13:55 +0000)]
staging: wfx: fix bss_loss

wfx_tx_confirm_cb()  retrieves the station associated with a frame using
the MAC address from the 802.11 header. In the other side wfx_tx()
retrieves the station using sta field from the ieee80211_tx_control
argument.

In wfx_cqm_bssloss_sm(), wfx_tx() was called directly without valid sta
field, but with a valid MAC address in 802.11 header. So there the
processing of this packet was unbalanced and may produce weird bugs.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-48-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: relocate "buffered" information to sta_priv
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:09 +0000 (13:55 +0000)]
staging: wfx: relocate "buffered" information to sta_priv

It simplify the code if field buffered is hosted in the struct sta_priv
instead of in the struct wfx_link_entry. More globally, struct
wfx_link_entry has no real reasons to exist and should be dropped soon.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-47-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: remove handling of "early_data"
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:08 +0000 (13:55 +0000)]
staging: wfx: remove handling of "early_data"

It seems that purpose of "early_data" was to prevent sending data to
mac80211 before station was completely associated. It is a useless
precaution.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-46-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: fix possible overflow on jiffies comparaison
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:06 +0000 (13:55 +0000)]
staging: wfx: fix possible overflow on jiffies comparaison

MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

It is recommended to use function time_*() to compare jiffies.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-45-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: fix case where RTS threshold is 0
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:05 +0000 (13:55 +0000)]
staging: wfx: fix case where RTS threshold is 0

If RTS threshold is 0, it currently disables RTS. It should mean
"enabled for every frames".

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-44-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: do not update uapsd if not necessary
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:03 +0000 (13:55 +0000)]
staging: wfx: do not update uapsd if not necessary

wfx_conf_tx() is called for each queue. On every call, the function
updates UAPSD mask and PM mode for all queues. It is a pity since the
UAPSD configuration very rarely changes and it makes exchanges between
the host and the chip more difficult to track.

This patch avoid to update UAPSD and Power Mode in most usual cases.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-43-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: with multiple vifs, force PS only if channels differs
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:02 +0000 (13:55 +0000)]
staging: wfx: with multiple vifs, force PS only if channels differs

When multiple vif are in use (the only supported configuration is one
station and one AP), the driver force power save flag on station.
This behavior allows the station to leave the station channel and make
its business on AP channel.

However, this has a big impact on station performances (especially since
only legacy PS is supported).

When both vifs use the same channel, it is not necessary to keep this
restriction. This greatly improve station performances.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-42-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: update power-save per interface
Jérôme Pouiller [Wed, 15 Jan 2020 13:55:01 +0000 (13:55 +0000)]
staging: wfx: update power-save per interface

mac80211 and the device are both able to control power-save per vif.
But, the current code retrieve power-save from wfx_config(). So, it does
not allow to setup power-save independently for each vif. Driver just
has to rely on wfx_bss_info_changed() instead of wfx_config().

wfx_config() has nothing to do anymore, but we keep it since it is
mandatory for mac80211.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-41-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify wfx_scan_complete()
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:59 +0000 (13:54 +0000)]
staging: wfx: simplify wfx_scan_complete()

wfx_scan_complete() do nothing with argument hif_ind_scan_cmpl. In add,
hif_ind_scan_cmpl come from hardware API and is not expected to be used
with upper layers of the driver.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-40-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify wfx_update_filtering()
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:58 +0000 (13:54 +0000)]
staging: wfx: simplify wfx_update_filtering()

wfx_update_filtering() has no reason to instantiate a struct
hif_mib_bcn_filter_enable. Drop it and simplify the code.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-39-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify wfx_set_mcast_filter()
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:56 +0000 (13:54 +0000)]
staging: wfx: simplify wfx_set_mcast_filter()

HIF functions return only serious errors (OOM or device freeze). The
current handling of errors in wfx_set_mcast_filter() does not bring
anything. Finally it may disturb the developer more than it helps.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-38-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify hif_set_config_data_filter()
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:55 +0000 (13:54 +0000)]
staging: wfx: simplify hif_set_config_data_filter()

The structure hif_mib_config_data_filter come from hardware
API. It is not intended to be manipulated in upper layers of the driver.

In add, current code for hif_set_config_data_filter() is too dumb. It
should pack data with hardware representation instead of leaving all
work to the caller.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-37-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify hif_set_mac_addr_condition()
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:54 +0000 (13:54 +0000)]
staging: wfx: simplify hif_set_mac_addr_condition()

The structure hif_mib_mac_addr_data_frame_condition come from hardware
API. It is not intended to be manipulated in upper layers of the driver.

In add, current code for hif_set_mac_addr_condition() is too dumb. It
should pack data with hardware representation instead of leaving all
work to the caller.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-36-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify hif_set_data_filtering()
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:52 +0000 (13:54 +0000)]
staging: wfx: simplify hif_set_data_filtering()

The structure hif_mib_set_data_filtering come from hardware API. It is
not intended to be manipulated in upper layers of the driver.

In add, current code for hif_set_data_filtering() is too dumb. It should
pack data with hardware representation instead of leaving all work to
the caller.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-35-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify hif_mib_set_data_filtering
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:51 +0000 (13:54 +0000)]
staging: wfx: simplify hif_mib_set_data_filtering

The field "default_filter" was not obvious.

In add, explicitly declare that fields default_filter and enable are
booleans.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-34-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify hif_mib_uc_mc_bc_data_frame_condition
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:49 +0000 (13:54 +0000)]
staging: wfx: simplify hif_mib_uc_mc_bc_data_frame_condition

The current API defines bitfields. It is not very convenient. Prefer to
use bitmasks.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-33-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify hif_set_uc_mc_bc_condition()
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:48 +0000 (13:54 +0000)]
staging: wfx: simplify hif_set_uc_mc_bc_condition()

The structure hif_mib_uc_mc_bc_data_frame_condition come from hardware
API. It is not intended to be manipulated in upper layers of the driver.

In add, current code for hif_set_uc_mc_bc_condition() is too dumb. It
should pack data with hardware representation instead of leaving all
work to the caller.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-32-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify hif_set_association_mode()
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:46 +0000 (13:54 +0000)]
staging: wfx: simplify hif_set_association_mode()

The structure hif_mib_set_association_mode come from hardware API. It is
not intended to be manipulated in upper layers of the driver.

In add, current code for hif_set_association_mode() is too dumb. It
should pack data with hardware representation instead of leaving all
work to the caller.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-31-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify hif_join()
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:44 +0000 (13:54 +0000)]
staging: wfx: simplify hif_join()

The structure hif_req_join come from hardware API. It is not intended
to be manipulated in upper layers of the driver.

In add, current code for hif_join() is too dumb. It should pack data
with hardware representation instead of leaving all work to the caller.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-30-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify hif_update_ie()
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:43 +0000 (13:54 +0000)]
staging: wfx: simplify hif_update_ie()

hif_update_ie() is only called to change the beacon template. So,
specialize this function and simplify the way to call it.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-29-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: SSID should be provided to hif_start() even if hidden
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:41 +0000 (13:54 +0000)]
staging: wfx: SSID should be provided to hif_start() even if hidden

SSID is hidden in beacon but firmware has to know to which probe
requests it has to answer.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-28-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: drop wfx_set_cts_work()
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:40 +0000 (13:54 +0000)]
staging: wfx: drop wfx_set_cts_work()

wfx_bss_info_changed() is not called from atomic contexts. So, it is not
necessary to raise an asynchronous work to change ERP. Thus
wfx_set_cts_work() become useless.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-27-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: drop wvif->setbssparams_done
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:38 +0000 (13:54 +0000)]
staging: wfx: drop wvif->setbssparams_done

setbssparams_done was here to ensure that the firmware does not enable
powersave before to get the first beacon. However, mac80211 already
ensures it gets a beacon before to associate to the BSS. And even, if
it won't, the firmware wake up at least on every DTIM, which is
sufficient to finalize the association.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-26-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: drop wvif->cqm_rssi_thold
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:37 +0000 (13:54 +0000)]
staging: wfx: drop wvif->cqm_rssi_thold

Current code keeps a copy of bss_conf->cqm_rssi_thold in wfx_vif. There
is no sane reason for that.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-25-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: drop wvif->enable_beacon
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:35 +0000 (13:54 +0000)]
staging: wfx: drop wvif->enable_beacon

It seems that current code try to save calls to hif_beacon_transmit() by
keeping a copy of the previous value of bss_conf->enable_beacon.
However, hif_beacon_transmit() does not cost so much and mac80211
already take care to not send useless events.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-24-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: drop wvif->dtim_period
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:34 +0000 (13:54 +0000)]
staging: wfx: drop wvif->dtim_period

It is not necessary to keep a copy of dtim_period in wfx_vif. Prefer to
just rely on bss_conf->dtim_period.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-23-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify update of DTIM period
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:32 +0000 (13:54 +0000)]
staging: wfx: simplify update of DTIM period

Current code parse the TIM and retrieve the DTIM period. It is far
easier to rely on bss_info_changed() for this job.

It is no more necessary to run task asynchronously. So
set_beacon_wakeup_period_work is now useless.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-22-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify wfx_flush()
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:30 +0000 (13:54 +0000)]
staging: wfx: simplify wfx_flush()

Current code of wfx_flush() force to drop packets in some contexts.
However, there is no obvious reasons to do that. It looks like a
workaround for a bug with the old implementation of __wfx_flush().

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-21-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: fix __wfx_flush() when drop == false
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:29 +0000 (13:54 +0000)]
staging: wfx: fix __wfx_flush() when drop == false

wfx_tx_queues_clear() only clear not yet sent requests. So, it always
necessary to wait for tx_queue_stats.wait_link_id_empty whatever the
value of "drop" argument.

In add, it is not necessary to return with tx queue locked since all
calls to __wfx_flush() unlock the tx queue just after the call to
__wfx_tx_flush().

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-20-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify wfx_update_beaconing()
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:27 +0000 (13:54 +0000)]
staging: wfx: simplify wfx_update_beaconing()

Remove most of indentation of wfx_update_beaconing() by reworking the
error handling.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-19-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify wfx_upload_ap_templates()
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:26 +0000 (13:54 +0000)]
staging: wfx: simplify wfx_upload_ap_templates()

This function built probe response from data retrieved in beacon. Yet,
this job can be done with ieee80211_proberesp_get(). So, we can simplify
that code (and fix bugs like inclusion of TIM in probe responses).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-18-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: rename wfx_upload_beacon()
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:24 +0000 (13:54 +0000)]
staging: wfx: rename wfx_upload_beacon()

In fact, wfx_upload_beacon() uploads beacon and probe response. So,
rename it in wfx_upload_ap_templates().

The call to wfx_fwd_probe_req() has nothing to do with template
uploading, so relocate it.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-17-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify wfx_config()
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:23 +0000 (13:54 +0000)]
staging: wfx: simplify wfx_config()

Now that wfx_config() only handles IEEE80211_CONF_CHANGE_PS, it can be
simplified.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-16-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: drop wdev->output_power
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:21 +0000 (13:54 +0000)]
staging: wfx: drop wdev->output_power

mac80211 and the device are both able to control tx power per vif. But,
the current code retrieve tx power from wfx_config(). So, it does not
allow to setup the tx power independently for each vif. Driver just has
to rely on bss_conf->txpower to get the correct information.

In add, it is no more necessary to protect access to wdev->output_power
with scan_lock.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-15-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: drop struct wfx_ht_info
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:20 +0000 (13:54 +0000)]
staging: wfx: drop struct wfx_ht_info

This struct is no more used.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-14-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: retrieve greenfield mode from sta->ht_cap and bss_conf
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:19 +0000 (13:54 +0000)]
staging: wfx: retrieve greenfield mode from sta->ht_cap and bss_conf

wvif->ht_info contains useless copies of sta->ht_cap and
bss_conf->ht_operation_mode. Prefer to retrieve information from the
original structs instead of rely on wvif->ht_info.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-13-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: retrieve ampdu_density from sta->ht_cap
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:17 +0000 (13:54 +0000)]
staging: wfx: retrieve ampdu_density from sta->ht_cap

wvif->ht_info.ht_cap is a useless copy of sta->ht_cap. It makes no sense
to rely on it.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-12-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: use specialized structs for HIF arguments
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:16 +0000 (13:54 +0000)]
staging: wfx: use specialized structs for HIF arguments

Most of the commands that are sent to device should take struct in
argument. In the current code, when this struct is binary compatible
with a __le32, the driver use a __le32. This behavior is error prone.
This patch fixes that and uses the specialized structs instead.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-11-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify hif_start() usage
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:14 +0000 (13:54 +0000)]
staging: wfx: simplify hif_start() usage

The structure hif_req_start come from hardware API. It is not intended
to be manipulated in upper layers of the driver.

In add, current code for hif_start() is too dumb. It should pack data
with hardware representation instead of leaving all work to the caller.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-10-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify hif_set_arp_ipv4_filter() usage
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:13 +0000 (13:54 +0000)]
staging: wfx: simplify hif_set_arp_ipv4_filter() usage

The structure hif_mib_arp_ip_addr_table come from hardware API. It is
not intended to be manipulated in upper layers of the driver.

In add, current code for hif_set_arp_ipv4_filter() is too dumb. It
should pack data using the hardware representation instead of leaving
all work to the caller.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-9-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify hif_set_rcpi_rssi_threshold() usage
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:12 +0000 (13:54 +0000)]
staging: wfx: simplify hif_set_rcpi_rssi_threshold() usage

The structure hif_mib_rcpi_rssi_threshold come from hardware API. It is
not intended to be manipulated in upper layers of the driver.

In add, current code for hif_set_rcpi_rssi_threshold() is dumb. It
should pack data using the hardware representation instead of leaving
all work to the caller.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-8-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify hif_set_output_power() usage
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:10 +0000 (13:54 +0000)]
staging: wfx: simplify hif_set_output_power() usage

Hardware API use 10th of dBm for output power unit. Upper layers should
use same units than mac80211 and the conversion should be done by low
level layer of the driver (hif_set_output_power())

In add, current code of hif_set_output_power() use a __le32 while the
device API specify a specific structure for this.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-7-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: simplify hif_set_tx_rate_retry_policy() usage
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:09 +0000 (13:54 +0000)]
staging: wfx: simplify hif_set_tx_rate_retry_policy() usage

The structure hif_mib_set_tx_rate_retry_policy come from hardware
API. It is not intended to be manipulated in upper layers of the driver.

So, this patch relocate handling of this structure to
hif_set_tx_rate_retry_policy() (the low level function).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-6-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: send rate policies one by one
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:07 +0000 (13:54 +0000)]
staging: wfx: send rate policies one by one

Rate policies (aka. tx_rate_retry_policy in hardware API) are sent to
device asynchronously from tx requests. So, the device maintains a list
of active rate policies and the tx requests only reference an existent
rate policy.

The device API allows to send multiple rate policies at once. However,
this property is very rarely used. We prefer to send rate policies one
by one and simplify the architecture.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-5-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: add missing PROBE_RESP_OFFLOAD feature
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:06 +0000 (13:54 +0000)]
staging: wfx: add missing PROBE_RESP_OFFLOAD feature

Some userspace tools (hostapd) rely on probe_resp_offload fields for
certain features.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-4-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: make hif_scan() usage clearer
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:05 +0000 (13:54 +0000)]
staging: wfx: make hif_scan() usage clearer

hif_scan() return max number of jiffies to wait before the completion
indication. However, if this value is negative, an error has occurred.

Reword the code to reflect that behavior.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-3-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: revert unexpected change in debugfs output
Jérôme Pouiller [Wed, 15 Jan 2020 13:54:03 +0000 (13:54 +0000)]
staging: wfx: revert unexpected change in debugfs output

It appears that commit 8c7128c4cf4e ("staging: align to fix warnings of
line over 80 characters") do slightly more than what is explained in
commit log.

Especially, it changes the output of the file rx_stats from debugfs.
From some point of view, this file can be considered as a part of the
API. Any change on it should be clearly announced.

Since the change introduced does not seems to have any justification,
revert it.

Reported-by: Pascal Prime <pascal.prime@silabs.com>
Cc: Jules Irenge <jbi.octave@gmail.com>
Fixes: 8c7128c4cf4e ("staging: align to fix warnings of line over 80 characters")
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-2-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: most: remove header include path to drivers/staging
Masahiro Yamada [Wed, 15 Jan 2020 16:44:51 +0000 (01:44 +0900)]
staging: most: remove header include path to drivers/staging

There is no need to add "ccflags-y += -I $(srctree)/drivers/staging"
just for including <most/most.h>.

Use the #include "..." directive with the correct relative path.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20200115164451.13203-1-masahiroy@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: most: core: remove noisy log messages
Christian Gromm [Tue, 14 Jan 2020 15:57:52 +0000 (16:57 +0100)]
staging: most: core: remove noisy log messages

In order to not generate unnecessary noise in the kernel log,this patch
removes debug log messages.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1579017478-3339-4-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: most: core: use dev_* function for logging
Christian Gromm [Tue, 14 Jan 2020 15:57:51 +0000 (16:57 +0100)]
staging: most: core: use dev_* function for logging

This patch replaces all calls to pr_* functions and uses
the dev_* functions instead.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1579017478-3339-3-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: most: core: fix date in file comment
Christian Gromm [Tue, 14 Jan 2020 15:57:50 +0000 (16:57 +0100)]
staging: most: core: fix date in file comment

This patch updates the date range in the comment section.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1579017478-3339-2-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: replace printk with natdev_<LEVEL> statements in ieee80211
Paulo Miguel Almeida [Wed, 15 Jan 2020 10:12:08 +0000 (23:12 +1300)]
staging: rtl8192u: replace printk with natdev_<LEVEL> statements in ieee80211

Checkpatch reports 'WARNING: printk() should include KERN_<LEVEL>
facility level'. Fix this by specifying a relevant KERN_<LEVEL> value
for each line in which it was missing.

Once they are fixed, checkpatch reports 'WARNING: Prefer [subsystem eg:
netdev]_dbg([subsystem]dev, ... then dev_dbg(dev, ... then
pr_debug(...  to printk(KERN_DEBUG ...'. Fix this by replacing
relevant printk_<level> statements with their netdev_<level>
equivalent.

Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/20200115101208.GA683742@localhost.localdomain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: vt6655: remove redundant assignment to variable ret
Colin Ian King [Tue, 14 Jan 2020 17:11:45 +0000 (17:11 +0000)]
staging: vt6655: remove redundant assignment to variable ret

The variable ret is being initialized with a value that
is never read and is being re-assigned later on. The
assignment is redundant and hence can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200114171145.375356-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wilc1000: remove redundant assignment to variable result
Colin Ian King [Tue, 14 Jan 2020 17:27:20 +0000 (17:27 +0000)]
staging: wilc1000: remove redundant assignment to variable result

The variable result is being initialized with a value that
is never read and is being re-assigned later on. The assignment
is redundant and hence can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200114172720.376286-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wlan-ng: ensure error return is actually returned
Colin Ian King [Tue, 14 Jan 2020 18:16:04 +0000 (18:16 +0000)]
staging: wlan-ng: ensure error return is actually returned

Currently when the call to prism2sta_ifst fails a netdev_err error
is reported, error return variable result is set to -1 but the
function always returns 0 for success.  Fix this by returning
the error value in variable result rather than 0.

Addresses-Coverity: ("Unused value")
Fixes: 00b3ed168508 ("Staging: add wlan-ng prism2 usb driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200114181604.390235-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: android: ashmem: Replace strcpy with strscpy
Ole Wiedemann [Fri, 13 Dec 2019 13:10:32 +0000 (14:10 +0100)]
staging: android: ashmem: Replace strcpy with strscpy

Replaced strcpy call with safer strscpy call with given length.
This elimates the need to manually null-terminate the given string,
since strscpy will null terminate the destination anyway.:

Signed-off-by: Ole Wiedemann <ole.wiedemann@fau.de>
Co-developed-by: Sebastian Scherbel <sebastian.scherbel@fau.de>
Signed-off-by: Sebastian Scherbel <sebastian.scherbel@fau.de>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Acked-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Acked-by: Todd Kjos <tkjos@google.com>
Link: https://lore.kernel.org/r/20191213131032.22579-1-ole.wiedemann@fau.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8188eu: cleanup whitespace in rtl8188e_dm.c
Michael Straube [Tue, 14 Jan 2020 13:44:22 +0000 (14:44 +0100)]
staging: rtl8188eu: cleanup whitespace in rtl8188e_dm.c

Replace tabs with spaces and/or remove spaces to use typical kernel
horizontal whitespace.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200114134422.13598-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8188eu: remove unnecessary parentheses in rtl8188e_dm.c
Michael Straube [Tue, 14 Jan 2020 13:44:21 +0000 (14:44 +0100)]
staging: rtl8188eu: remove unnecessary parentheses in rtl8188e_dm.c

Remove unnecessary parentheses reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200114134422.13598-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8188eu: cleanup long lines in rtl8188e_dm.c
Michael Straube [Tue, 14 Jan 2020 13:44:20 +0000 (14:44 +0100)]
staging: rtl8188eu: cleanup long lines in rtl8188e_dm.c

Cleanup lines over 80 characters in rtl8188e_dm.c by adding
appropriate line breaks.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200114134422.13598-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8188eu: convert rtw_hal_antdiv_before_linked() to bool
Michael Straube [Tue, 14 Jan 2020 13:44:19 +0000 (14:44 +0100)]
staging: rtl8188eu: convert rtw_hal_antdiv_before_linked() to bool

Function rtw_hal_antdiv_before_linked() returns boolean values, so
change the return type from u8 to bool.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200114134422.13598-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8188eu: refactor rtw_hal_antdiv_before_linked()
Michael Straube [Tue, 14 Jan 2020 13:44:18 +0000 (14:44 +0100)]
staging: rtl8188eu: refactor rtw_hal_antdiv_before_linked()

Refactor rtw_hal_antdiv_before_linked() to clear checkpatch warnings.

WARNING: line over 80 characters
WARNING: else is not generally useful after a break or return

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200114134422.13598-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8723bs: remove ODM_GetRightChnlPlaceforIQK()
Michael Straube [Fri, 10 Jan 2020 21:04:56 +0000 (22:04 +0100)]
staging: rtl8723bs: remove ODM_GetRightChnlPlaceforIQK()

Function ODM_GetRightChnlPlaceforIQK() returns non-zero values only
for channels > 14. According to the TODO code valid only for 5 GHz
should be removed.

- find and remove remaining code valid only for 5 GHz. Most of the
  obvious ones have been removed, but things like channel > 14 still
  exist.

Remove ODM_GetRightChnlPlaceforIQK() and replace the uses of the
return value with zero.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200110210456.13178-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: exfat: Fix alignment warnings
Pragat Pandya [Sat, 11 Jan 2020 14:22:33 +0000 (19:52 +0530)]
staging: exfat: Fix alignment warnings

Fix checkpatch warning "Alignment should match open parenthesis".

Signed-off-by: Pragat Pandya <pragat.pandya@gmail.com>
Link: https://lore.kernel.org/r/20200111142233.11354-1-pragat.pandya@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8188eu: remove unused parameters from rtw_check_network_type
Michael Straube [Mon, 13 Jan 2020 21:29:39 +0000 (22:29 +0100)]
staging: rtl8188eu: remove unused parameters from rtw_check_network_type

Parameters 'ratelen' and 'channel' of function rtw_check_network_type are
unused, remove them. Reduces object file size by 62 bytes.

  text    data     bss     dec     hex filename
398525   12896    4688  416109   6596d drivers/staging/rtl8188eu/r8188eu.o
398463   12896    4688  416047   6592f drivers/staging/rtl8188eu/r8188eu.o

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200113212939.9738-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoMerge 5.5-rc6 into staging-next
Greg Kroah-Hartman [Mon, 13 Jan 2020 06:52:17 +0000 (07:52 +0100)]
Merge 5.5-rc6 into staging-next

We need the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoLinux 5.5-rc6
Linus Torvalds [Mon, 13 Jan 2020 00:55:08 +0000 (16:55 -0800)]
Linux 5.5-rc6

4 years agoMerge tag 'riscv/for-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv...
Linus Torvalds [Mon, 13 Jan 2020 00:48:39 +0000 (16:48 -0800)]
Merge tag 'riscv/for-v5.5-rc6' of git://git./linux/kernel/git/riscv/linux

Pull RISC-V fixes from Paul Walmsley:
 "Two fixes for RISC-V:

   - Clear FP registers during boot when FP support is present, rather
     than when they aren't present

   - Move the header files associated with the SiFive L2 cache
     controller to drivers/soc (where the code was recently moved)"

* tag 'riscv/for-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  riscv: Fixup obvious bug for fp-regs reset
  riscv: move sifive_l2_cache.h to include/soc

4 years agoriscv: Fixup obvious bug for fp-regs reset
Guo Ren [Sun, 5 Jan 2020 02:52:14 +0000 (10:52 +0800)]
riscv: Fixup obvious bug for fp-regs reset

CSR_MISA is defined in Privileged Architectures' spec: 3.1.1 Machine
ISA Register misa. Every bit:1 indicate a feature, so we should beqz
reset_done when there is no F/D bit in csr_misa register.

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
[paul.walmsley@sifive.com: fix typo in commit message]
Fixes: 9e80635619b51 ("riscv: clear the instruction cache and all registers when booting")
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
4 years agoriscv: move sifive_l2_cache.h to include/soc
Yash Shah [Wed, 8 Jan 2020 06:09:06 +0000 (22:09 -0800)]
riscv: move sifive_l2_cache.h to include/soc

The commit 9209fb51896f ("riscv: move sifive_l2_cache.c to drivers/soc")
moves the sifive L2 cache driver to driver/soc. It did not move the
header file along with the driver. Therefore this patch moves the header
file to driver/soc

Signed-off-by: Yash Shah <yash.shah@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
[paul.walmsley@sifive.com: updated to fix the include guard]
Fixes: 9209fb51896f ("riscv: move sifive_l2_cache.c to drivers/soc")
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
4 years agoMerge tag 'iommu-fixes-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 12 Jan 2020 17:35:42 +0000 (09:35 -0800)]
Merge tag 'iommu-fixes-v5.5-rc5' of git://git./linux/kernel/git/joro/iommu

Pull iommu fixes from Joerg Roedel:

 - Two fixes for VT-d and generic IOMMU code to fix teardown on error
   handling code paths.

 - Patch for the Intel VT-d driver to fix handling of non-PCI devices

 - Fix W=1 compile warning in dma-iommu code

* tag 'iommu-fixes-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/dma: fix variable 'cookie' set but not used
  iommu/vt-d: Unlink device if failed to add to group
  iommu: Remove device link to group on failure
  iommu/vt-d: Fix adding non-PCI devices to Intel IOMMU

4 years agoMerge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sat, 11 Jan 2020 23:40:43 +0000 (15:40 -0800)]
Merge branch 'i2c/for-current' of git://git./linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "Two driver bugfixes, a documentation fix, and a removal of a spec
  violation for the bus recovery algorithm in the core"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: fix bus recovery stop mode timing
  i2c: bcm2835: Store pointer to bus clock
  dt-bindings: i2c: at91: fix i2c-sda-hold-time-ns documentation for sam9x60
  i2c: at91: fix clk_offset for sam9x60

4 years agoMerge tag 'clone3-tls-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 11 Jan 2020 23:33:48 +0000 (15:33 -0800)]
Merge tag 'clone3-tls-v5.5-rc6' of git://git./linux/kernel/git/brauner/linux

Pull thread fixes from Christian Brauner:
 "This contains a series of patches to fix CLONE_SETTLS when used with
  clone3().

  The clone3() syscall passes the tls argument through struct clone_args
  instead of a register. This means, all architectures that do not
  implement copy_thread_tls() but still support CLONE_SETTLS via
  copy_thread() expecting the tls to be located in a register argument
  based on clone() are currently unfortunately broken. Their tls value
  will be garbage.

  The patch series fixes this on all architectures that currently define
  __ARCH_WANT_SYS_CLONE3. It also adds a compile-time check to ensure
  that any architecture that enables clone3() in the future is forced to
  also implement copy_thread_tls().

  My ultimate goal is to get rid of the copy_thread()/copy_thread_tls()
  split and just have copy_thread_tls() at some point in the not too
  distant future (Maybe even renaming copy_thread_tls() back to simply
  copy_thread() once the old function is ripped from all arches). This
  is dependent now on all arches supporting clone3().

  While all relevant arches do that now there are still four missing:
  ia64, m68k, sh and sparc. They have the system call reserved, but not
  implemented. Once they all implement clone3() we can get rid of
  ARCH_WANT_SYS_CLONE3 and HAVE_COPY_THREAD_TLS.

  This series also includes a minor fix for the arm64 uapi headers which
  caused __NR_clone3 to be missing from the exported user headers.

  Unfortunately the series came in a little late especially given that
  it touches a range of architectures. Due to the holidays not all arch
  maintainers responded in time probably due to their backlog. Will and
  Arnd have thankfully acked the arm specific changes.

  Given that the changes are straightforward and rather minimal combined
  with the fact the that clone3() with CLONE_SETTLS is broken I decided
  to send them post rc3 nonetheless"

* tag 'clone3-tls-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
  um: Implement copy_thread_tls
  clone3: ensure copy_thread_tls is implemented
  xtensa: Implement copy_thread_tls
  riscv: Implement copy_thread_tls
  parisc: Implement copy_thread_tls
  arm: Implement copy_thread_tls
  arm64: Implement copy_thread_tls
  arm64: Move __ARCH_WANT_SYS_CLONE3 definition to uapi headers

4 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Linus Torvalds [Fri, 10 Jan 2020 21:41:16 +0000 (13:41 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/hid/hid

Pull HID fix from Jiri Kosina:
 "A regression fix for EPOLLOUT handling in hidraw and uhid"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: hidraw, uhid: Always report EPOLLOUT

4 years agoMerge tag 'usb-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Fri, 10 Jan 2020 21:29:40 +0000 (13:29 -0800)]
Merge tag 'usb-5.5-rc6' of git://git./linux/kernel/git/gregkh/usb

Pull USB/PHY fixes from Greg KH:
 "Here are a number of USB and PHY driver fixes for 5.5-rc6

  Nothing all that unusual, just the a bunch of small fixes for a lot of
  different reported issues. The PHY driver fixes are in here as they
  interacted with the usb drivers.

  Full details of the patches are in the shortlog, and all of these have
  been in linux-next with no reported issues"

* tag 'usb-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (24 commits)
  usb: missing parentheses in USE_NEW_SCHEME
  usb: ohci-da8xx: ensure error return on variable error is set
  usb: musb: Disable pullup at init
  usb: musb: fix idling for suspend after disconnect interrupt
  usb: typec: ucsi: Fix the notification bit offsets
  USB: Fix: Don't skip endpoint descriptors with maxpacket=0
  USB-PD tcpm: bad warning+size, PPS adapters
  phy/rockchip: inno-hdmi: round clock rate down to closest 1000 Hz
  usb: chipidea: host: Disable port power only if previously enabled
  usb: cdns3: should not use the same dev_id for shared interrupt handler
  usb: dwc3: gadget: Fix request complete check
  usb: musb: dma: Correct parameter passed to IRQ handler
  usb: musb: jz4740: Silence error if code is -EPROBE_DEFER
  usb: udc: tegra: select USB_ROLE_SWITCH
  USB: core: fix check for duplicate endpoints
  phy: cpcap-usb: Drop extra write to usb2 register
  phy: cpcap-usb: Improve host vs docked mode detection
  phy: cpcap-usb: Prevent USB line glitches from waking up modem
  phy: mapphone-mdm6600: Fix uninitialized status value regression
  phy: cpcap-usb: Fix flakey host idling and enumerating of devices
  ...

4 years agoMerge tag 'char-misc-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Fri, 10 Jan 2020 21:25:24 +0000 (13:25 -0800)]
Merge tag 'char-misc-5.5-rc6' of git://git./linux/kernel/git/gregkh/char-misc

Pull char/misc fix from Greg KH:
 "Here is a single fix, for the chrdev core, for 5.5-rc6

  There's been a long-standing race condition triggered by syzbot, and
  occasionally real people, in the chrdev open() path. Will finally took
  the time to track it down and fix it for real before the holidays.

  Here's that one patch, it's been in linux-next for a while with no
  reported issues and it does fix the reported problem"

* tag 'char-misc-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  chardev: Avoid potential use-after-free in 'chrdev_open()'

4 years agoMerge tag 'staging-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Fri, 10 Jan 2020 21:22:11 +0000 (13:22 -0800)]
Merge tag 'staging-5.5-rc6' of git://git./linux/kernel/git/gregkh/staging

Pull staging fixes from Greg KH:
 "Here are some small staging driver fixes for 5.5-rc6.

  Nothing major here, just some small fixes for a comedi driver, the
  vt6656 driver, and a new device id for the rtl8188eu driver.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'staging-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: rtl8188eu: Add device code for TP-Link TL-WN727N v5.21
  staging: comedi: adv_pci1710: fix AI channels 16-31 for PCI-1713
  staging: vt6656: set usb_set_intfdata on driver fail.
  staging: vt6656: remove bool from vnt_radio_power_on ret
  staging: vt6656: limit reg output to block size
  staging: vt6656: correct return of vnt_init_registers.
  staging: vt6656: Fix non zero logical return of, usb_control_msg

4 years agoMerge tag 'tty-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Fri, 10 Jan 2020 21:17:21 +0000 (13:17 -0800)]
Merge tag 'tty-5.5-rc6' of git://git./linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here are two tty/serial driver fixes for 5.5-rc6.

  The first fixes a much much reported issue with a previous tty port
  link patch that is in your tree, and the second fixes a problem where
  the serdev driver would claim ACPI devices that it shouldn't be
  claiming.

  Both have been in linux-next for a while with no reported issues"

* tag 'tty-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serdev: Don't claim unsupported ACPI serial devices
  tty: always relink the port

4 years agoMerge tag 'block-5.5-2020-01-10' of git://git.kernel.dk/linux-block
Linus Torvalds [Fri, 10 Jan 2020 20:05:26 +0000 (12:05 -0800)]
Merge tag 'block-5.5-2020-01-10' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "A few fixes that should go into this round.

  This pull request contains two NVMe fixes via Keith, removal of a dead
  function, and a fix for the bio op for read truncates (Ming)"

* tag 'block-5.5-2020-01-10' of git://git.kernel.dk/linux-block:
  nvmet: fix per feat data len for get_feature
  nvme: Translate more status codes to blk_status_t
  fs: move guard_bio_eod() after bio_set_op_attrs
  block: remove unused mp_bvec_last_segment

4 years agoMerge tag 'io_uring-5.5-2020-01-10' of git://git.kernel.dk/linux-block
Linus Torvalds [Fri, 10 Jan 2020 20:03:12 +0000 (12:03 -0800)]
Merge tag 'io_uring-5.5-2020-01-10' of git://git.kernel.dk/linux-block

Pull io_uring fix from Jens Axboe:
 "Single fix for this series, fixing a regression with the short read
  handling.

  This just removes it, as it cannot safely be done for all cases"

* tag 'io_uring-5.5-2020-01-10' of git://git.kernel.dk/linux-block:
  io_uring: remove punt of short reads to async context

4 years agoMerge tag 'mtd/fixes-for-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 10 Jan 2020 19:57:10 +0000 (11:57 -0800)]
Merge tag 'mtd/fixes-for-5.5-rc6' of git://git./linux/kernel/git/mtd/linux

Pull MTD fixes from Miquel Raynal:
 "MTD:
   - sm_ftl: Fix NULL pointer warning.

  Raw NAND:
   - Cadence: fix compile testing.
   - STM32: Avoid locking.

  Onenand:
   - Fix several sparse/build warnings.

  SPI-NOR:
   - Add a flag to fix interaction with Micron parts"

* tag 'mtd/fixes-for-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
  mtd: spi-nor: Fix the writing of the Status Register on micron flashes
  mtd: sm_ftl: fix NULL pointer warning
  mtd: onenand: omap2: Pass correct flags for prep_dma_memcpy
  mtd: onenand: samsung: Fix iomem access with regular memcpy
  mtd: onenand: omap2: Fix errors in style
  mtd: cadence: Fix cast to pointer from integer of different size warning
  mtd: rawnand: stm32_fmc2: avoid to lock the CPU bus

4 years agoMerge tag 'sound-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Fri, 10 Jan 2020 19:52:36 +0000 (11:52 -0800)]
Merge tag 'sound-5.5-rc6' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A few piled ASoC fixes and usual HD-audio and USB-audio fixups. Some
  of them are for ASoC core error-handling"

* tag 'sound-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda: enable regmap internal locking
  ALSA: hda/realtek - Add quirk for the bass speaker on Lenovo Yoga X1 7th gen
  ALSA: hda/realtek - Set EAPD control to default for ALC222
  ALSA: usb-audio: Apply the sample rate quirk for Bose Companion 5
  ALSA: hda/realtek - Add new codec supported for ALCS1200A
  ASoC: Intel: boards: Fix compile-testing RT1011/RT5682
  ASoC: SOF: imx8: Fix dsp_box offset
  ASoC: topology: Prevent use-after-free in snd_soc_get_pcm_runtime()
  ASoC: fsl_audmix: add missed pm_runtime_disable
  ASoC: stm32: spdifrx: fix input pin state management
  ASoC: stm32: spdifrx: fix race condition in irq handler
  ASoC: stm32: spdifrx: fix inconsistent lock state
  ASoC: core: Fix access to uninitialized list heads
  ASoC: soc-core: Set dpcm_playback / dpcm_capture
  ASoC: SOF: imx8: fix memory allocation failure check on priv->pd_dev
  ASoC: SOF: Intel: hda: hda-dai: fix oops on hda_link .hw_free
  ASoC: SOF: fix fault at driver unload after failed probe

4 years agoMerge tag 'thermal-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal...
Linus Torvalds [Fri, 10 Jan 2020 19:48:37 +0000 (11:48 -0800)]
Merge tag 'thermal-v5.5-rc5' of git://git./linux/kernel/git/thermal/linux

Pull thermal fix from Daniel Lezcano:
 "Fix backward compatibility with old DTBs on QCOM tsens (Amit
  Kucheria)"

* tag 'thermal-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux:
  drivers: thermal: tsens: Work with old DTBs

4 years agoMerge tag 'pm-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Fri, 10 Jan 2020 19:46:59 +0000 (11:46 -0800)]
Merge tag 'pm-5.5-rc6' of git://git./linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
 "Prevent the cpufreq-dt driver from probing Tegra20/30 (Dmitry
  Osipenko) and prevent the Intel RAPL power capping driver from
  crashing during CPU initialization due to a NULL pointer dereference
  if the processor model in use is not known to it (Harry Pan)"

* tag 'pm-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  powercap: intel_rapl: add NULL pointer check to rapl_mmio_cpu_online()
  cpufreq: dt-platdev: Blacklist NVIDIA Tegra20 and Tegra30 SoCs

4 years agostaging: vc04_services: remove header include path to vc04_services
Masahiro Yamada [Fri, 10 Jan 2020 13:56:15 +0000 (22:56 +0900)]
staging: vc04_services: remove header include path to vc04_services

Fix up some relative paths in #include "..." directives, and remove
the include path to drivers/staging/vc04_services.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20200110135615.11617-1-masahiroy@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agonvmet: fix per feat data len for get_feature
Amit Engel [Tue, 7 Jan 2020 16:47:24 +0000 (01:47 +0900)]
nvmet: fix per feat data len for get_feature

The existing implementation for the get_feature admin-cmd does not
use per-feature data len. This patch introduces a new helper function
nvmet_feat_data_len(), which is used to calculate per feature data len.
Right now we only set data len for fid 0x81 (NVME_FEAT_HOST_ID).

Fixes: commit e9061c397839 ("nvmet: Remove the data_len field from the nvmet_req struct")

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Amit Engel <amit.engel@dell.com>
[endiness, naming, and kernel style fixes]
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
4 years agonvme: Translate more status codes to blk_status_t
Keith Busch [Thu, 5 Dec 2019 19:50:44 +0000 (04:50 +0900)]
nvme: Translate more status codes to blk_status_t

Decode interrupted command and not ready namespace nvme status codes to
BLK_STS_TARGET. These are not generic IO errors and should use a non-path
specific error so that it can use the non-failover retry path.

Reported-by: John Meneghini <John.Meneghini@netapp.com>
Cc: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
4 years agoHID: hidraw, uhid: Always report EPOLLOUT
Jiri Kosina [Fri, 10 Jan 2020 14:32:51 +0000 (15:32 +0100)]
HID: hidraw, uhid: Always report EPOLLOUT

hidraw and uhid device nodes are always available for writing so we should
always report EPOLLOUT and EPOLLWRNORM bits, not only in the cases when
there is nothing to read.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Fixes: be54e7461ffdc ("HID: uhid: Fix returning EPOLLOUT from uhid_char_poll")
Fixes: 9f3b61dc1dd7b ("HID: hidraw: Fix returning EPOLLOUT from hidraw_poll")
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
4 years agostaging: vt6656: Move ieee80211_rx_status off stack.
Malcolm Priestley [Wed, 8 Jan 2020 21:41:56 +0000 (21:41 +0000)]
staging: vt6656: Move ieee80211_rx_status off stack.

ieee80211_rx_status off stack to IEEE80211_SKB_RXCB (skb->cb)
removing the need to copy on to it.

skb->cb is always present as a clean buffer so simply fill
it in.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/a66caba4-0c17-41af-a58f-3cdbb3243fb0@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: vt6656: Fix false Tx excessive retries reporting.
Malcolm Priestley [Wed, 8 Jan 2020 21:41:36 +0000 (21:41 +0000)]
staging: vt6656: Fix false Tx excessive retries reporting.

The driver reporting  IEEE80211_TX_STAT_ACK is not being handled
correctly. The driver should only report on TSR_TMO flag is not
set indicating no transmission errors and when not IEEE80211_TX_CTL_NO_ACK
is being requested.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/340f1f7f-c310-dca5-476f-abc059b9cd97@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>