Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8723au: fix sparse incorrect type assignment warnings

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>

authored by

Kieron Browne and committed by
Greg Kroah-Hartman
f78c0710 adabff85

+2 -2
+2 -2
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
··· 3168 3168 ht_cap->mcs.rx_mask[1] = 0x00; 3169 3169 ht_cap->mcs.rx_mask[4] = 0x01; 3170 3170 3171 - ht_cap->mcs.rx_highest = MAX_BIT_RATE_40MHZ_MCS7; 3171 + ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS7); 3172 3172 } else if ((rf_type == RF_1T2R) || (rf_type == RF_2T2R)) { 3173 3173 ht_cap->mcs.rx_mask[0] = 0xFF; 3174 3174 ht_cap->mcs.rx_mask[1] = 0xFF; 3175 3175 ht_cap->mcs.rx_mask[4] = 0x01; 3176 3176 3177 - ht_cap->mcs.rx_highest = MAX_BIT_RATE_40MHZ_MCS15; 3177 + ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS15); 3178 3178 } else { 3179 3179 DBG_8723A("%s, error rf_type =%d\n", __func__, rf_type); 3180 3180 }