Search Linux Wireless

Re: rtlwifi: fix broken VHT support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux