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

staging: vt6656: rxtx.c create structure to join vnt_tx_data_head with vnt_tx_head.

Create struct vnt_tx_mic_hdr for with union vnt_tx_data_head
for mic mode.

Create union vnt_tx for mic and non mic mode.

Attach vnt_rrv_time_* to relevant tx_head.

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
56c60e4f 9e38a5c1

+28 -9
+6 -6
drivers/staging/vt6656/rxtx.c
··· 870 870 if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { 871 871 if (need_rts) { 872 872 //Fill RsvTime 873 - struct vnt_rrv_time_rts *pBuf = &tx_buffer->tx_head.rts; 873 + struct vnt_rrv_time_rts *pBuf = &tx_buffer->tx_head.tx_rts.rts; 874 874 875 875 pBuf->wRTSTxRrvTime_aa = s_uGetRTSCTSRsvTime(pDevice, 2, 876 876 byPktType, cbFrameSize, wCurrentRate); ··· 889 889 } 890 890 else {//RTS_needless, PCF mode 891 891 //Fill RsvTime 892 - struct vnt_rrv_time_cts *pBuf = &tx_buffer->tx_head.cts; 892 + struct vnt_rrv_time_cts *pBuf = &tx_buffer->tx_head.tx_cts.cts; 893 893 894 894 pBuf->wTxRrvTime_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, 895 895 cbFrameSize, wCurrentRate, bNeedACK); ··· 906 906 else if (byPktType == PK_TYPE_11A) { 907 907 if (need_rts) { 908 908 //Fill RsvTime 909 - struct vnt_rrv_time_ab *pBuf = &tx_buffer->tx_head.ab; 909 + struct vnt_rrv_time_ab *pBuf = &tx_buffer->tx_head.tx_ab.ab; 910 910 911 911 pBuf->wRTSTxRrvTime = s_uGetRTSCTSRsvTime(pDevice, 2, 912 912 byPktType, cbFrameSize, wCurrentRate); ··· 917 917 bNeedACK, psEthHeader, wCurrentRate, byFBOption); 918 918 } else { 919 919 //Fill RsvTime 920 - struct vnt_rrv_time_ab *pBuf = &tx_buffer->tx_head.ab; 920 + struct vnt_rrv_time_ab *pBuf = &tx_buffer->tx_head.tx_ab.ab; 921 921 922 922 pBuf->wTxRrvTime = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, 923 923 cbFrameSize, wCurrentRate, bNeedACK); ··· 926 926 else if (byPktType == PK_TYPE_11B) { 927 927 if (need_rts) { 928 928 //Fill RsvTime 929 - struct vnt_rrv_time_ab *pBuf = &tx_buffer->tx_head.ab; 929 + struct vnt_rrv_time_ab *pBuf = &tx_buffer->tx_head.tx_ab.ab; 930 930 931 931 pBuf->wRTSTxRrvTime = s_uGetRTSCTSRsvTime(pDevice, 0, 932 932 byPktType, cbFrameSize, wCurrentRate); ··· 938 938 } 939 939 else { //RTS_needless, non PCF mode 940 940 //Fill RsvTime 941 - struct vnt_rrv_time_ab *pBuf = &tx_buffer->tx_head.ab; 941 + struct vnt_rrv_time_ab *pBuf = &tx_buffer->tx_head.tx_ab.ab; 942 942 943 943 pBuf->wTxRrvTime = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, 944 944 cbFrameSize, wCurrentRate, bNeedACK);
+22 -3
drivers/staging/vt6656/rxtx.h
··· 180 180 struct vnt_cts_fb cts_g_fb; 181 181 }; 182 182 183 + struct vnt_tx_mic_hdr { 184 + struct vnt_mic_hdr hdr; 185 + union vnt_tx_data_head head; 186 + } __packed; 187 + 188 + union vnt_tx { 189 + struct vnt_tx_mic_hdr mic; 190 + union vnt_tx_data_head head; 191 + }; 192 + 183 193 union vnt_tx_head { 184 - struct vnt_rrv_time_rts rts; 185 - struct vnt_rrv_time_cts cts; 186 - struct vnt_rrv_time_ab ab; 194 + struct { 195 + struct vnt_rrv_time_rts rts; 196 + union vnt_tx tx; 197 + } __packed tx_rts; 198 + struct { 199 + struct vnt_rrv_time_cts cts; 200 + union vnt_tx tx; 201 + } __packed tx_cts; 202 + struct { 203 + struct vnt_rrv_time_ab ab; 204 + union vnt_tx tx; 205 + } __packed tx_ab; 187 206 }; 188 207 189 208 struct vnt_tx_fifo_head {