--- driver_ipw.c.orig 2005-05-24 09:44:25 +0400 +++ driver_ipw.c 2005-07-02 15:55:12 +0400 @@ -73,19 +73,18 @@ } wpa_param; struct { u32 len; - u8 reserved[32]; - u8 data[0]; + u8 *data; } wpa_ie; struct{ - u32 command; - u32 reason_code; + int command; + int reason_code; } mlme; struct { u8 alg[IPW_CRYPT_ALG_NAME_LEN]; u8 set_tx; u32 err; u8 idx; - u8 seq[8]; + u8 seq[8]; /* sequence counter (set: RX, get: TX) */ u16 key_len; u8 key[0]; } crypt; @@ -161,10 +160,11 @@ memset(param, 0, blen); param->cmd = IPW_CMD_SET_WPA_IE; param->u.wpa_ie.len = wpa_ie_len; + param->u.wpa_ie.data = (u8 *) malloc(wpa_ie_len); memcpy(param->u.wpa_ie.data, wpa_ie, wpa_ie_len); ret = ipw_ioctl(drv, param, blen, 1); - + free(param->u.wpa_ie.data); free(param); return ret; }