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

staging: vt6656: struct vnt_tx_fifo_head fifo_ctl change base type to __le16

Endian is always little add correction in vnt_tx_packet.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Malcolm Priestley and committed by
Greg Kroah-Hartman
47e08894 1e00b449

+15 -13
+14 -12
drivers/staging/vt6656/rxtx.c
··· 830 830 if (pkt_type == PK_TYPE_11A) 831 831 tx_buffer_head->fifo_ctl = 0; 832 832 else if (pkt_type == PK_TYPE_11B) 833 - tx_buffer_head->fifo_ctl = FIFOCTL_11B; 833 + tx_buffer_head->fifo_ctl = cpu_to_le16(FIFOCTL_11B); 834 834 else if (pkt_type == PK_TYPE_11GB) 835 - tx_buffer_head->fifo_ctl = FIFOCTL_11GB; 835 + tx_buffer_head->fifo_ctl = cpu_to_le16(FIFOCTL_11GB); 836 836 else if (pkt_type == PK_TYPE_11GA) 837 - tx_buffer_head->fifo_ctl = FIFOCTL_11GA; 837 + tx_buffer_head->fifo_ctl = cpu_to_le16(FIFOCTL_11GA); 838 838 839 839 if (!ieee80211_is_data(hdr->frame_control)) { 840 - tx_buffer_head->fifo_ctl |= (FIFOCTL_GENINT | 841 - FIFOCTL_ISDMA0); 842 - tx_buffer_head->fifo_ctl |= FIFOCTL_TMOEN; 840 + tx_buffer_head->fifo_ctl |= cpu_to_le16(FIFOCTL_GENINT | 841 + FIFOCTL_ISDMA0); 842 + tx_buffer_head->fifo_ctl |= cpu_to_le16(FIFOCTL_TMOEN); 843 843 844 844 tx_buffer_head->time_stamp = 845 845 cpu_to_le16(DEFAULT_MGN_LIFETIME_RES_64us); ··· 849 849 } 850 850 851 851 if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) { 852 - tx_buffer_head->fifo_ctl |= FIFOCTL_NEEDACK; 852 + tx_buffer_head->fifo_ctl |= cpu_to_le16(FIFOCTL_NEEDACK); 853 853 tx_context->need_ack = true; 854 854 } 855 855 856 856 if (ieee80211_has_retry(hdr->frame_control)) 857 - tx_buffer_head->fifo_ctl |= FIFOCTL_LRETRY; 857 + tx_buffer_head->fifo_ctl |= cpu_to_le16(FIFOCTL_LRETRY); 858 858 859 859 if (tx_rate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) 860 860 priv->preamble_type = PREAMBLE_SHORT; ··· 863 863 864 864 if (tx_rate->flags & IEEE80211_TX_RC_USE_RTS_CTS) { 865 865 need_rts = true; 866 - tx_buffer_head->fifo_ctl |= FIFOCTL_RTS; 866 + tx_buffer_head->fifo_ctl |= cpu_to_le16(FIFOCTL_RTS); 867 867 } 868 868 869 869 if (ieee80211_has_a4(hdr->frame_control)) 870 - tx_buffer_head->fifo_ctl |= FIFOCTL_LHEAD; 870 + tx_buffer_head->fifo_ctl |= cpu_to_le16(FIFOCTL_LHEAD); 871 871 872 872 if (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER) 873 873 is_pspoll = true; ··· 899 899 /* legacy rates TODO use ieee80211_tx_rate */ 900 900 if (current_rate >= RATE_18M && ieee80211_is_data(hdr->frame_control)) { 901 901 if (priv->auto_fb_ctrl == AUTO_FB_0) { 902 - tx_buffer_head->fifo_ctl |= FIFOCTL_AUTO_FB_0; 902 + tx_buffer_head->fifo_ctl |= 903 + cpu_to_le16(FIFOCTL_AUTO_FB_0); 903 904 904 905 priv->tx_rate_fb0 = 905 906 vnt_fb_opt0[FB_RATE0][current_rate - RATE_18M]; ··· 909 908 910 909 fb_option = AUTO_FB_0; 911 910 } else if (priv->auto_fb_ctrl == AUTO_FB_1) { 912 - tx_buffer_head->fifo_ctl |= FIFOCTL_AUTO_FB_1; 911 + tx_buffer_head->fifo_ctl |= 912 + cpu_to_le16(FIFOCTL_AUTO_FB_1); 913 913 914 914 priv->tx_rate_fb0 = 915 915 vnt_fb_opt1[FB_RATE0][current_rate - RATE_18M];
+1 -1
drivers/staging/vt6656/rxtx.h
··· 222 222 223 223 struct vnt_tx_fifo_head { 224 224 u8 tx_key[WLAN_KEY_LEN_CCMP]; 225 - u16 fifo_ctl; 225 + __le16 fifo_ctl; 226 226 __le16 time_stamp; 227 227 __le16 frag_ctl; 228 228 __le16 current_rate;