]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: rtl8723au: fix sparse incorrect type assignment warnings
authorKieron Browne <kieron.browne@gmail.com>
Tue, 16 Sep 2014 22:28:09 +0000 (23:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Sep 2014 23:28:04 +0000 (16:28 -0700)
Use cpu_to_le16 to cast int for assignment to __le16 members

Signed-off-by: Kieron Browne <kieron.browne@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c

index 4b39476d903e7d04ff1de2c419413fdd084ab8ad..f547ac66d05c9fe75200929435bf7bcd2f9aea19 100644 (file)
@@ -3168,13 +3168,13 @@ static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap,
                ht_cap->mcs.rx_mask[1] = 0x00;
                ht_cap->mcs.rx_mask[4] = 0x01;
 
-               ht_cap->mcs.rx_highest = MAX_BIT_RATE_40MHZ_MCS7;
+               ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS7);
        } else if ((rf_type == RF_1T2R) || (rf_type == RF_2T2R)) {
                ht_cap->mcs.rx_mask[0] = 0xFF;
                ht_cap->mcs.rx_mask[1] = 0xFF;
                ht_cap->mcs.rx_mask[4] = 0x01;
 
-               ht_cap->mcs.rx_highest = MAX_BIT_RATE_40MHZ_MCS15;
+               ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS15);
        } else {
                DBG_8723A("%s, error rf_type =%d\n", __func__, rf_type);
        }