linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: rtlwifi: fix broken VHT support
Date: Mon, 8 Feb 2016 13:52:02 -0600	[thread overview]
Message-ID: <56B8F1E2.6050509@lwfinger.net> (raw)
In-Reply-To: <20160208182224.GC18802@mwanda>

On 02/08/2016 12:22 PM, Dan Carpenter wrote:
> Hello Larry Finger,
>
> The patch d76d65fd2695: "rtlwifi: fix broken VHT support" from Feb 1,
> 2016, leads to the following static checker warning:
>
> 	drivers/net/wireless/realtek/rtlwifi/rc.c:144 _rtl_rc_rate_set_series()
> 	warn: impossible condition '(wireless_mode == 256) => (0-255 == 256)'
>
> drivers/net/wireless/realtek/rtlwifi/rc.c
>     135                  if (sgi_20 || sgi_40 || sgi_80)
>     136                          rate->flags |= IEEE80211_TX_RC_SHORT_GI;
>     137                  if (sta && sta->ht_cap.ht_supported &&
>     138                      ((wireless_mode == WIRELESS_MODE_N_5G) ||
>     139                       (wireless_mode == WIRELESS_MODE_N_24G)))
>     140                          rate->flags |= IEEE80211_TX_RC_MCS;
>     141                  if (sta && sta->vht_cap.vht_supported &&
>     142                      (wireless_mode == WIRELESS_MODE_AC_5G ||
>     143                       wireless_mode == WIRELESS_MODE_AC_24G ||
>     144                       wireless_mode == WIRELESS_MODE_AC_ONLY))
>                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Not possible.  sta_entry->wireless_mode is u8 and WIRELESS_MODE_AC_ONLY
> is 0x100.
>
>     145                          rate->flags |= IEEE80211_TX_RC_VHT_MCS;
>     146          }
>     147  }
>
>

Dan,

Thanks for the heads-up. Obviously, wireless_mode needs to be u16, but I will 
need some time to consider any side effects as the underlying variable in the 
private space is used by several of the rtlwifi family.

Larry



  reply	other threads:[~2016-02-08 19:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 18:22 rtlwifi: fix broken VHT support Dan Carpenter
2016-02-08 19:52 ` Larry Finger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-02-01 18:58 [PATCH] rtlwifi: Fix warning from ieee80211_get_tx_rates() when using 5G Larry Finger
2016-02-06 10:59 ` rtlwifi: fix broken VHT support Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56B8F1E2.6050509@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).