This patch is meant for testing on big-endian hardware. Every indication is that the data in the bootrec structure is little endian. This patch fixes a usage of the u32 data array as a string of u8's. Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx> --- Index: wireless-testing/drivers/net/wireless/p54/p54common.h =================================================================== --- wireless-testing.orig/drivers/net/wireless/p54/p54common.h +++ wireless-testing/drivers/net/wireless/p54/p54common.h @@ -18,7 +18,10 @@ struct bootrec { __le32 code; __le32 len; - u32 data[10]; + union { + u32 data[10]; + u8 data_char[40]; + } __attribute__((packed)); __le16 rx_mtu; } __attribute__((packed)); Index: wireless-testing/drivers/net/wireless/p54/p54common.c =================================================================== --- wireless-testing.orig/drivers/net/wireless/p54/p54common.c +++ wireless-testing/drivers/net/wireless/p54/p54common.c @@ -171,8 +171,8 @@ int p54_parse_firmware(struct ieee80211_ break; case BR_CODE_COMPONENT_VERSION: /* 24 bytes should be enough for all firmwares */ - if (strnlen((unsigned char*)bootrec->data, 24) < 24) - fw_version = (unsigned char*)bootrec->data; + if (strnlen(bootrec->data_char, 24) < 24) + fw_version = bootrec->data_char; break; case BR_CODE_DESCR: { struct bootrec_desc *desc = -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html