ie_data[0] = ttl;
ie_data[1] = flags;
- RTW_PUT_LE16((u8 *)&ie_data[2], reason);
- RTW_PUT_LE16((u8 *)&ie_data[4], precedence);
+ *(u16 *)(ie_data+2) = cpu_to_le16(reason);
+ *(u16 *)(ie_data+4) = cpu_to_le16(precedence);
return rtw_set_ie(buf, 0x118, 6, ie_data, buf_len);
}
*pbuf = attr_id;
- /* u16*)(pbuf + 1) = cpu_to_le16(attr_len); */
- RTW_PUT_LE16(pbuf + 1, attr_len);
+ *(u16 *)(pbuf + 1) = cpu_to_le16(attr_len);
if (pdata_attr)
memcpy(pbuf + 3, pdata_attr, attr_len);
p2pie[p2pielen++] = P2P_ATTR_CAPABILITY;
/* Length: */
- /* u16*) (p2pie + p2pielen) = cpu_to_le16(0x0002); */
- RTW_PUT_LE16(p2pie + p2pielen, 0x0002);
+ *(u16 *) (p2pie + p2pielen) = cpu_to_le16(0x0002);
p2pielen += 2;
/* Value: */
p2pie[p2pielen++] = P2P_ATTR_EX_LISTEN_TIMING;
/* Length: */
- /* u16*) (p2pie + p2pielen) = cpu_to_le16(0x0004); */
- RTW_PUT_LE16(p2pie + p2pielen, 0x0004);
+ *(u16 *) (p2pie + p2pielen) = cpu_to_le16(0x0004);
p2pielen += 2;
/* Value: */
/* Availability Period */
- /* u16*) (p2pie + p2pielen) = cpu_to_le16(0xFFFF); */
- RTW_PUT_LE16(p2pie + p2pielen, 0xFFFF);
+ *(u16 *) (p2pie + p2pielen) = cpu_to_le16(0xFFFF);
p2pielen += 2;
/* Availability Interval */
- /* u16*) (p2pie + p2pielen) = cpu_to_le16(0xFFFF); */
- RTW_PUT_LE16(p2pie + p2pielen, 0xFFFF);
+ *(u16 *) (p2pie + p2pielen) = cpu_to_le16(0xFFFF);
p2pielen += 2;
/* Length: */
/* 21 -> P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) */
/* + NumofSecondDevType (1byte) + WPS Device Name ID field (2bytes) + WPS Device Name Len field (2bytes) */
- /* u16*) (p2pie + p2pielen) = cpu_to_le16(21 + pwdinfo->device_name_len); */
- RTW_PUT_LE16(p2pie + p2pielen, 21 + pwdinfo->device_name_len);
+ *(u16 *) (p2pie + p2pielen) = cpu_to_le16(21 + pwdinfo->device_name_len);
p2pielen += 2;
/* Value: */
p2pie[p2pielen++] = P2P_ATTR_CAPABILITY;
/* Length: */
- /* u16*) (p2pie + p2pielen) = cpu_to_le16(0x0002); */
- RTW_PUT_LE16(p2pie + p2pielen, 0x0002);
+ *(u16 *) (p2pie + p2pielen) = cpu_to_le16(0x0002);
p2pielen += 2;
/* Value: */
/* Length: */
/* 21 -> P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) */
/* + NumofSecondDevType (1byte) + WPS Device Name ID field (2bytes) + WPS Device Name Len field (2bytes) */
- /* u16*) (p2pie + p2pielen) = cpu_to_le16(21 + pwdinfo->device_name_len); */
- RTW_PUT_LE16(p2pie + p2pielen, 21 + pwdinfo->device_name_len);
+ *(u16 *) (p2pie + p2pielen) = cpu_to_le16(21 + pwdinfo->device_name_len);
p2pielen += 2;
/* Value: */
p2pie[p2pielen++] = P2P_ATTR_GROUP_ID;
/* Length: */
- /* u16*) (p2pie + p2pielen) = cpu_to_le16(ETH_ALEN + ussidlen); */
- RTW_PUT_LE16(p2pie + p2pielen, ETH_ALEN + ussidlen);
+ *(u16 *) (p2pie + p2pielen) = cpu_to_le16(ETH_ALEN + ussidlen);
p2pielen += 2;
/* Value: */