return buf_desc;
}
-static inline struct recv_frame *rxmem_to_recvframe(u8 *rxmem)
-{
- /* due to the design of 2048 bytes alignment of recv_frame,
- * we can reference the struct recv_frame */
- /* from any given member of recv_frame. */
- /* rxmem indicates the any member/address in recv_frame */
-
- return (struct recv_frame *)(((size_t)rxmem >> RXFRAME_ALIGN) <<
- RXFRAME_ALIGN);
-}
-
-static inline struct recv_frame *pkt_to_recvframe(struct sk_buff *pkt)
-{
- u8 *buf_star;
- struct recv_frame *precv_frame;
- precv_frame = rxmem_to_recvframe((unsigned char *)buf_star);
-
- return precv_frame;
-}
-
-static inline u8 *pkt_to_recvmem(struct sk_buff *pkt)
-{
- /* return the rx_head */
-
- struct recv_frame *precv_frame = pkt_to_recvframe(pkt);
-
- return precv_frame->rx_head;
-}
-
-static inline u8 *pkt_to_recvdata(struct sk_buff *pkt)
-{
- /* return the rx_data */
-
- struct recv_frame *precv_frame = pkt_to_recvframe(pkt);
-
- return precv_frame->rx_data;
-}
-
static inline int get_recvframe_len(struct recv_frame *precvframe)
{
return precvframe->len;