staging: vt6656: rxtx.h always pack BEACON_BUFFER/TX_BUFFER
PATCH 1/3 staging: vt6656: rxtx.h always pack BEACON_BUFFER/TX_BUFFER
All structure members of BEACON_BUFFER/TX_BUFFER should be packed.
--- drivers/staging/vt6656/rxtx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/vt6656/rxtx.h +2 -2
@@ -609,7 +609,7 @@ typedef struct tagSTX_BUFFER// Actual message TX_BUFFER_CONTAINER BufferHeader; -}TX_BUFFER , *PTX_BUFFER ; +}__packed TX_BUFFER , *PTX_BUFFER ;// // Remote NDIS message format
@@ -626,7 +626,7 @@ typedef struct tagSBEACON_BUFFER// Actual message TX_BUFFER_CONTAINER BufferHeader; -}BEACON_BUFFER , *PBEACON_BUFFER ; +}__packed BEACON_BUFFER , *PBEACON_BUFFER ;void vDMA0_tx_80211 (struct vnt_private *,struct sk_buff *skb);int nsDMA_tx_packet (struct vnt_private *,u32 uDMAIdx,struct sk_buff *skb);
Signature · 1 line
1.8.1.2
Greg KH
maintainerQuoted 1 line · Malcolm Priestley
All structure members of BEACON_BUFFER/TX_BUFFER should be packed.
Why?
What happens if they are not?
greg k-h
Quoted 4 lines · Greg KH
Quoted 1 line · Malcolm Priestley
All structure members of BEACON_BUFFER/TX_BUFFER should be packed.
Why?
Only the first 4 members of these structures are live.
The forth member is referenced at run-time by packed structures. typedef struct tagSTxBufHead
typedef struct tagSTxShortBufHead
in desc.h
If these structures are not packed the alignment of these members will be wrong.
Quoted 2 lines
What happens if they are not?
The driver does not work.
Regards
Malcolm
Greg KH
maintainerQuoted 8 lines · Malcolm Priestley
Quoted 4 lines · Greg KH
Quoted 1 line · Malcolm Priestley
All structure members of BEACON_BUFFER/TX_BUFFER should be packed.
Why?
Only the first 4 members of these structures are live.
Quoted 7 lines
The forth member is referenced at run-time by packed structures. typedef struct tagSTxBufHead
typedef struct tagSTxShortBufHead
indesc.hIf these structures are not packed the alignment of these members will be wrong.
Then say all of this in the patch please :)
Quoted 3 lines
Quoted 2 lines
What happens if they are not?
The driver does not work.
How is it working today without this change?
thanks,
greg k-h
Quoted 17 lines · Greg KH
Quoted 8 lines · Malcolm Priestley
Quoted 4 lines · Greg KH
Quoted 1 line · Malcolm Priestley
All structure members of BEACON_BUFFER/TX_BUFFER should be packed.
Why?
Only the first 4 members of these structures are live.
Quoted 7 lines
The forth member is referenced at run-time by packed structures. typedef struct tagSTxBufHead
typedef struct tagSTxShortBufHead
indesc.hIf these structures are not packed the alignment of these members will be wrong.
Quoted 7 lines
Then say all of this in the patch please :)
Quoted 3 lines
Quoted 2 lines
What happens if they are not?
The driver does not work.
How is it working today without this change?
Well for *me* it works.
It appears the structure is packed anyway.
But is this guaranteed?
Anyway, do you want me to resend the patch.
Greg KH
maintainerQuoted 24 lines · Malcolm Priestley
Quoted 23 lines · Greg KH
Quoted 8 lines · Malcolm Priestley
Quoted 4 lines · Greg KH
Quoted 1 line · Malcolm Priestley
All structure members of BEACON_BUFFER/TX_BUFFER should be packed.
Why?
Only the first 4 members of these structures are live.
Quoted 7 lines
The forth member is referenced at run-time by packed structures. typedef struct tagSTxBufHead
typedef struct tagSTxShortBufHead
indesc.hIf these structures are not packed the alignment of these members will be wrong.
Then say all of this in the patch please :)
Quoted 3 lines
Quoted 2 lines
What happens if they are not?
The driver does not work.
Quoted 9 lines
Quoted 1 line
How is it working today without this change?
Well for *me* it works.
It appears the structure is packed anyway.
But is this guaranteed?
Anyway, do you want me to resend the patch.
Yes, please do, with this added information, and all other patches from you that I did not apply, due to me not accepting this one.
thanks,
greg k-h