*pcur = psta->dev_cap;
                        pcur++;
 
-                       /* u16*)(pcur) = cpu_to_be16(psta->config_methods); */
-                       RTW_PUT_BE16(pcur, psta->config_methods);
+                       *((u16 *)(pcur)) = cpu_to_be16(psta->config_methods);
                        pcur += 2;
 
                        memcpy(pcur, psta->primary_dev_type, 8);
                        pcur += psta->num_of_secdev_type*8;
 
                        if (psta->dev_name_len > 0) {
-                               /* u16*)(pcur) = cpu_to_be16(WPS_ATTR_DEVICE_NAME); */
-                               RTW_PUT_BE16(pcur, WPS_ATTR_DEVICE_NAME);
+                               *(u16 *)(pcur) = cpu_to_be16(WPS_ATTR_DEVICE_NAME);
                                pcur += 2;
 
-                               /* u16*)(pcur) = cpu_to_be16(psta->dev_name_len); */
-                               RTW_PUT_BE16(pcur, psta->dev_name_len);
+                               *(u16 *)(pcur) = cpu_to_be16(psta->dev_name_len);
                                pcur += 2;
 
                                memcpy(pcur, psta->dev_name, psta->dev_name_len);
 
        /*      Config Method */
        /*      Type: */
-       RTW_PUT_BE16(wpsie + wpsielen, WPS_ATTR_CONF_METHOD);
+       *(u16 *)(wpsie+wpsielen) = cpu_to_be16(WPS_ATTR_CONF_METHOD);
        wpsielen += 2;
 
        /*      Length: */
-       RTW_PUT_BE16(wpsie + wpsielen, 0x0002);
+       *(u16 *)(wpsie+wpsielen) = cpu_to_be16(0x0002);
        wpsielen += 2;
 
        /*      Value: */
-       RTW_PUT_BE16(wpsie + wpsielen, config_method);
+       *(u16 *)(wpsie+wpsielen) = cpu_to_be16(config_method);
        wpsielen += 2;
 
        pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *)wpsie, &pattrib->pktlen);
 
        /*      Config Method */
        /*      This field should be big endian. Noted by P2P specification. */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(pwdinfo->supported_wps_cm); */
-       RTW_PUT_BE16(p2pie + p2pielen, pwdinfo->supported_wps_cm);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(pwdinfo->supported_wps_cm);
        p2pielen += 2;
 
        /*      Primary Device Type */
        /*      Category ID */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_CID_MULIT_MEDIA); */
-       RTW_PUT_BE16(p2pie + p2pielen, WPS_PDT_CID_MULIT_MEDIA);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_CID_MULIT_MEDIA);
        p2pielen += 2;
 
        /*      OUI */
        p2pielen += 4;
 
        /*      Sub Category ID */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_SCID_MEDIA_SERVER); */
-       RTW_PUT_BE16(p2pie + p2pielen, WPS_PDT_SCID_MEDIA_SERVER);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_SCID_MEDIA_SERVER);
        p2pielen += 2;
 
        /*      Number of Secondary Device Types */
 
        /*      Device Name */
        /*      Type: */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_ATTR_DEVICE_NAME); */
-       RTW_PUT_BE16(p2pie + p2pielen, WPS_ATTR_DEVICE_NAME);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_ATTR_DEVICE_NAME);
        p2pielen += 2;
 
        /*      Length: */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(pwdinfo->device_name_len); */
-       RTW_PUT_BE16(p2pie + p2pielen, pwdinfo->device_name_len);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(pwdinfo->device_name_len);
        p2pielen += 2;
 
        /*      Value: */
        /*      Config Method */
        /*      This field should be big endian. Noted by P2P specification. */
        if (pwdinfo->ui_got_wps_info == P2P_GOT_WPSINFO_PBC) {
-               /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_CONFIG_METHOD_PBC); */
-               RTW_PUT_BE16(p2pie + p2pielen, WPS_CONFIG_METHOD_PBC);
+               *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_CONFIG_METHOD_PBC);
        } else {
-               /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_CONFIG_METHOD_DISPLAY); */
-               RTW_PUT_BE16(p2pie + p2pielen, WPS_CONFIG_METHOD_DISPLAY);
+               *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_CONFIG_METHOD_DISPLAY);
        }
 
        p2pielen += 2;
 
        /*      Primary Device Type */
        /*      Category ID */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_CID_MULIT_MEDIA); */
-       RTW_PUT_BE16(p2pie + p2pielen, WPS_PDT_CID_MULIT_MEDIA);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_CID_MULIT_MEDIA);
        p2pielen += 2;
 
        /*      OUI */
        p2pielen += 4;
 
        /*      Sub Category ID */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_SCID_MEDIA_SERVER); */
-       RTW_PUT_BE16(p2pie + p2pielen, WPS_PDT_SCID_MEDIA_SERVER);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_SCID_MEDIA_SERVER);
        p2pielen += 2;
 
        /*      Number of Secondary Device Types */
 
        /*      Device Name */
        /*      Type: */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_ATTR_DEVICE_NAME); */
-       RTW_PUT_BE16(p2pie + p2pielen, WPS_ATTR_DEVICE_NAME);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_ATTR_DEVICE_NAME);
        p2pielen += 2;
 
        /*      Length: */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(pwdinfo->device_name_len); */
-       RTW_PUT_BE16(p2pie + p2pielen, pwdinfo->device_name_len);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(pwdinfo->device_name_len);
        p2pielen += 2;
 
        /*      Value: */