static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct pkt_attrib *pattrib)
 {
-       struct pkt_file pktfile;
        struct sta_info *psta = NULL;
        struct ethhdr etherhdr;
 
        struct qos_priv         *pqospriv = &pmlmepriv->qospriv;
        int res = _SUCCESS;
 
-
-       _rtw_open_pktfile(pkt, &pktfile);
-       _rtw_pktfile_read(&pktfile, (u8 *)ðerhdr, ETH_HLEN);
+       skb_copy_bits(pkt, 0, ðerhdr, ETH_HLEN);
 
        pattrib->ether_type = ntohs(etherhdr.h_proto);
 
                memcpy(pattrib->ta, get_bssid(pmlmepriv), ETH_ALEN);
        }
 
-       pattrib->pktlen = pktfile.pkt_len;
+       pattrib->pktlen = pkt->len - ETH_HLEN;
 
        if (pattrib->ether_type == ETH_P_IP) {
                /*  The following is for DHCP and ARP packet, we use cck1M to tx these packets and let LPS awake some time */
                /*  to prevent DHCP protocol fail */
                u8 tmp[24];
 
-               _rtw_pktfile_read(&pktfile, &tmp[0], 24);
+               skb_copy_bits(pkt, ETH_HLEN, tmp, 24);
+
                pattrib->dhcp_pkt = 0;
-               if (pktfile.pkt_len > 282) {/* MINIMUM_DHCP_PACKET_SIZE) { */
+               if (pkt->len > ETH_HLEN + 24 + 282) {/* MINIMUM_DHCP_PACKET_SIZE) { */
                        if (pattrib->ether_type == ETH_P_IP) {/*  IP header */
                                if (((tmp[21] == 68) && (tmp[23] == 67)) ||
                                    ((tmp[21] == 67) && (tmp[23] == 68))) {
 
        if (check_fwstate(pmlmepriv, WIFI_AP_STATE|WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE)) {
                if (psta->qos_option)
-                       set_qos(pktfile.pkt, pattrib);
+                       set_qos(pkt, pattrib);
        } else {
                if (pqospriv->qos_option) {
-                       set_qos(pktfile.pkt, pattrib);
+                       set_qos(pkt, pattrib);
 
                        if (pmlmepriv->acm_mask != 0)
                                pattrib->priority = qos_acm(pmlmepriv->acm_mask, pattrib->priority);