xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/ssv6xxx/smac/lib.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Copyright (c) 2015 South Silicon Valley Microelectronics Inc.
3  * Copyright (c) 2015 iComm Corporation
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12  * See the GNU General Public License for more details.
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #include <ssv6200.h>
18 #include "lib.h"
ssv_skb_alloc(s32 len)19 struct sk_buff *ssv_skb_alloc(s32 len)
20 {
21     struct sk_buff *skb;
22     skb = __dev_alloc_skb(len + 128 , GFP_KERNEL);
23     if (skb != NULL) {
24         skb_put(skb,0x20);
25         skb_pull(skb,0x20);
26     }
27     return skb;
28 }
ssv_skb_free(struct sk_buff * skb)29 void ssv_skb_free(struct sk_buff *skb)
30 {
31     dev_kfree_skb_any(skb);
32 }
33