Commit 0a588577 authored by Tobias Polzer's avatar Tobias Polzer Committed by Greg Kroah-Hartman

staging: csr: Fix obvious logic error in staging/csr

In uf_process_ma_packet_req() (staging/csr/unifi_pdu_processing.c), the
test for
(staInfo->timSet != CSR_WIFI_TIM_RESET) || (staInfo->timSet !=
CSR_WIFI_TIM_RESETTING)
obviously makes no sense and causes GCC to emit a warning if
-Wlogical-op is enabled.
As suggested in the referenced bug report, || was replaced by &&.

References: https://bugzilla.kernel.org/show_bug.cgi?id=46571Reported-By: default avatarDavid Binderman <dcb314@hotmail.com>
Signed-off-by: default avatarTobias Polzer <tobias.polzer@fau.de>
Signed-off-by: default avatarDominik Paulus <dominik.paulus@fau.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 126898b0
...@@ -2704,7 +2704,7 @@ static void uf_handle_uspframes_delivery(unifi_priv_t * priv, CsrWifiRouterCtrlS ...@@ -2704,7 +2704,7 @@ static void uf_handle_uspframes_delivery(unifi_priv_t * priv, CsrWifiRouterCtrlS
*/ */
is_all_ac_deliver_enabled_and_moredata(staInfo, &allDeliveryEnabled, &dataAvailable); is_all_ac_deliver_enabled_and_moredata(staInfo, &allDeliveryEnabled, &dataAvailable);
if ((allDeliveryEnabled && !dataAvailable)) { if ((allDeliveryEnabled && !dataAvailable)) {
if ((staInfo->timSet != CSR_WIFI_TIM_RESET) || (staInfo->timSet != CSR_WIFI_TIM_RESETTING)) { if ((staInfo->timSet != CSR_WIFI_TIM_RESET) && (staInfo->timSet != CSR_WIFI_TIM_RESETTING)) {
staInfo->updateTimReqQueued = (u8) CSR_WIFI_TIM_RESET; staInfo->updateTimReqQueued = (u8) CSR_WIFI_TIM_RESET;
unifi_trace(priv, UDBG4, " --uf_handle_uspframes_delivery, UAPSD timset\n"); unifi_trace(priv, UDBG4, " --uf_handle_uspframes_delivery, UAPSD timset\n");
if (!staInfo->timRequestPendingFlag) { if (!staInfo->timRequestPendingFlag) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment