ieee80211_tx.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. /******************************************************************************
  2. Copyright(c) 2003 - 2005 Intel Corporation. All rights reserved.
  3. This program is free software; you can redistribute it and/or modify it
  4. under the terms of version 2 of the GNU General Public License as
  5. published by the Free Software Foundation.
  6. This program is distributed in the hope that it will be useful, but WITHOUT
  7. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  8. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  9. more details.
  10. You should have received a copy of the GNU General Public License along with
  11. this program; if not, write to the Free Software Foundation, Inc., 59
  12. Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  13. The full GNU General Public License is included in this distribution in the
  14. file called LICENSE.
  15. Contact Information:
  16. James P. Ketrenos <ipw2100-admin@linux.intel.com>
  17. Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  18. ******************************************************************************/
  19. #include <linux/compiler.h>
  20. #include <linux/config.h>
  21. #include <linux/errno.h>
  22. #include <linux/if_arp.h>
  23. #include <linux/in6.h>
  24. #include <linux/in.h>
  25. #include <linux/ip.h>
  26. #include <linux/kernel.h>
  27. #include <linux/module.h>
  28. #include <linux/netdevice.h>
  29. #include <linux/proc_fs.h>
  30. #include <linux/skbuff.h>
  31. #include <linux/slab.h>
  32. #include <linux/tcp.h>
  33. #include <linux/types.h>
  34. #include <linux/wireless.h>
  35. #include <linux/etherdevice.h>
  36. #include <asm/uaccess.h>
  37. #include <net/ieee80211.h>
  38. /*
  39. 802.11 Data Frame
  40. ,-------------------------------------------------------------------.
  41. Bytes | 2 | 2 | 6 | 6 | 6 | 2 | 0..2312 | 4 |
  42. |------|------|---------|---------|---------|------|---------|------|
  43. Desc. | ctrl | dura | DA/RA | TA | SA | Sequ | Frame | fcs |
  44. | | tion | (BSSID) | | | ence | data | |
  45. `--------------------------------------------------| |------'
  46. Total: 28 non-data bytes `----.----'
  47. |
  48. .- 'Frame data' expands to <---------------------------'
  49. |
  50. V
  51. ,---------------------------------------------------.
  52. Bytes | 1 | 1 | 1 | 3 | 2 | 0-2304 |
  53. |------|------|---------|----------|------|---------|
  54. Desc. | SNAP | SNAP | Control |Eth Tunnel| Type | IP |
  55. | DSAP | SSAP | | | | Packet |
  56. | 0xAA | 0xAA |0x03 (UI)|0x00-00-F8| | |
  57. `-----------------------------------------| |
  58. Total: 8 non-data bytes `----.----'
  59. |
  60. .- 'IP Packet' expands, if WEP enabled, to <--'
  61. |
  62. V
  63. ,-----------------------.
  64. Bytes | 4 | 0-2296 | 4 |
  65. |-----|-----------|-----|
  66. Desc. | IV | Encrypted | ICV |
  67. | | IP Packet | |
  68. `-----------------------'
  69. Total: 8 non-data bytes
  70. 802.3 Ethernet Data Frame
  71. ,-----------------------------------------.
  72. Bytes | 6 | 6 | 2 | Variable | 4 |
  73. |-------|-------|------|-----------|------|
  74. Desc. | Dest. | Source| Type | IP Packet | fcs |
  75. | MAC | MAC | | | |
  76. `-----------------------------------------'
  77. Total: 18 non-data bytes
  78. In the event that fragmentation is required, the incoming payload is split into
  79. N parts of size ieee->fts. The first fragment contains the SNAP header and the
  80. remaining packets are just data.
  81. If encryption is enabled, each fragment payload size is reduced by enough space
  82. to add the prefix and postfix (IV and ICV totalling 8 bytes in the case of WEP)
  83. So if you have 1500 bytes of payload with ieee->fts set to 500 without
  84. encryption it will take 3 frames. With WEP it will take 4 frames as the
  85. payload of each frame is reduced to 492 bytes.
  86. * SKB visualization
  87. *
  88. * ,- skb->data
  89. * |
  90. * | ETHERNET HEADER ,-<-- PAYLOAD
  91. * | | 14 bytes from skb->data
  92. * | 2 bytes for Type --> ,T. | (sizeof ethhdr)
  93. * | | | |
  94. * |,-Dest.--. ,--Src.---. | | |
  95. * | 6 bytes| | 6 bytes | | | |
  96. * v | | | | | |
  97. * 0 | v 1 | v | v 2
  98. * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
  99. * ^ | ^ | ^ |
  100. * | | | | | |
  101. * | | | | `T' <---- 2 bytes for Type
  102. * | | | |
  103. * | | '---SNAP--' <-------- 6 bytes for SNAP
  104. * | |
  105. * `-IV--' <-------------------- 4 bytes for IV (WEP)
  106. *
  107. * SNAP HEADER
  108. *
  109. */
  110. static u8 P802_1H_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0xf8 };
  111. static u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 };
  112. static int ieee80211_copy_snap(u8 * data, u16 h_proto)
  113. {
  114. struct ieee80211_snap_hdr *snap;
  115. u8 *oui;
  116. snap = (struct ieee80211_snap_hdr *)data;
  117. snap->dsap = 0xaa;
  118. snap->ssap = 0xaa;
  119. snap->ctrl = 0x03;
  120. if (h_proto == 0x8137 || h_proto == 0x80f3)
  121. oui = P802_1H_OUI;
  122. else
  123. oui = RFC1042_OUI;
  124. snap->oui[0] = oui[0];
  125. snap->oui[1] = oui[1];
  126. snap->oui[2] = oui[2];
  127. *(u16 *) (data + SNAP_SIZE) = htons(h_proto);
  128. return SNAP_SIZE + sizeof(u16);
  129. }
  130. static int ieee80211_encrypt_fragment(struct ieee80211_device *ieee,
  131. struct sk_buff *frag, int hdr_len)
  132. {
  133. struct ieee80211_crypt_data *crypt = ieee->crypt[ieee->tx_keyidx];
  134. int res;
  135. if (crypt == NULL)
  136. return -1;
  137. /* To encrypt, frame format is:
  138. * IV (4 bytes), clear payload (including SNAP), ICV (4 bytes) */
  139. atomic_inc(&crypt->refcnt);
  140. res = 0;
  141. if (crypt->ops && crypt->ops->encrypt_mpdu)
  142. res = crypt->ops->encrypt_mpdu(frag, hdr_len, crypt->priv);
  143. atomic_dec(&crypt->refcnt);
  144. if (res < 0) {
  145. printk(KERN_INFO "%s: Encryption failed: len=%d.\n",
  146. ieee->dev->name, frag->len);
  147. ieee->ieee_stats.tx_discards++;
  148. return -1;
  149. }
  150. return 0;
  151. }
  152. void ieee80211_txb_free(struct ieee80211_txb *txb)
  153. {
  154. int i;
  155. if (unlikely(!txb))
  156. return;
  157. for (i = 0; i < txb->nr_frags; i++)
  158. if (txb->fragments[i])
  159. dev_kfree_skb_any(txb->fragments[i]);
  160. kfree(txb);
  161. }
  162. static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
  163. int headroom, gfp_t gfp_mask)
  164. {
  165. struct ieee80211_txb *txb;
  166. int i;
  167. txb = kmalloc(sizeof(struct ieee80211_txb) + (sizeof(u8 *) * nr_frags),
  168. gfp_mask);
  169. if (!txb)
  170. return NULL;
  171. memset(txb, 0, sizeof(struct ieee80211_txb));
  172. txb->nr_frags = nr_frags;
  173. txb->frag_size = txb_size;
  174. for (i = 0; i < nr_frags; i++) {
  175. txb->fragments[i] = __dev_alloc_skb(txb_size + headroom,
  176. gfp_mask);
  177. if (unlikely(!txb->fragments[i])) {
  178. i--;
  179. break;
  180. }
  181. skb_reserve(txb->fragments[i], headroom);
  182. }
  183. if (unlikely(i != nr_frags)) {
  184. while (i >= 0)
  185. dev_kfree_skb_any(txb->fragments[i--]);
  186. kfree(txb);
  187. return NULL;
  188. }
  189. return txb;
  190. }
  191. /* Incoming skb is converted to a txb which consists of
  192. * a block of 802.11 fragment packets (stored as skbs) */
  193. int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
  194. {
  195. struct ieee80211_device *ieee = netdev_priv(dev);
  196. struct ieee80211_txb *txb = NULL;
  197. struct ieee80211_hdr_3addr *frag_hdr;
  198. int i, bytes_per_frag, nr_frags, bytes_last_frag, frag_size,
  199. rts_required;
  200. unsigned long flags;
  201. struct net_device_stats *stats = &ieee->stats;
  202. int ether_type, encrypt, host_encrypt, host_encrypt_msdu, host_build_iv;
  203. int bytes, fc, hdr_len;
  204. struct sk_buff *skb_frag;
  205. struct ieee80211_hdr_3addr header = { /* Ensure zero initialized */
  206. .duration_id = 0,
  207. .seq_ctl = 0
  208. };
  209. u8 dest[ETH_ALEN], src[ETH_ALEN];
  210. struct ieee80211_crypt_data *crypt;
  211. int priority = skb->priority;
  212. int snapped = 0;
  213. if (ieee->is_queue_full && (*ieee->is_queue_full) (dev, priority))
  214. return NETDEV_TX_BUSY;
  215. spin_lock_irqsave(&ieee->lock, flags);
  216. /* If there is no driver handler to take the TXB, dont' bother
  217. * creating it... */
  218. if (!ieee->hard_start_xmit) {
  219. printk(KERN_WARNING "%s: No xmit handler.\n", ieee->dev->name);
  220. goto success;
  221. }
  222. if (unlikely(skb->len < SNAP_SIZE + sizeof(u16))) {
  223. printk(KERN_WARNING "%s: skb too small (%d).\n",
  224. ieee->dev->name, skb->len);
  225. goto success;
  226. }
  227. ether_type = ntohs(((struct ethhdr *)skb->data)->h_proto);
  228. crypt = ieee->crypt[ieee->tx_keyidx];
  229. encrypt = !(ether_type == ETH_P_PAE && ieee->ieee802_1x) &&
  230. ieee->sec.encrypt;
  231. host_encrypt = ieee->host_encrypt && encrypt && crypt;
  232. host_encrypt_msdu = ieee->host_encrypt_msdu && encrypt && crypt;
  233. host_build_iv = ieee->host_build_iv && encrypt && crypt;
  234. if (!encrypt && ieee->ieee802_1x &&
  235. ieee->drop_unencrypted && ether_type != ETH_P_PAE) {
  236. stats->tx_dropped++;
  237. goto success;
  238. }
  239. /* Save source and destination addresses */
  240. memcpy(dest, skb->data, ETH_ALEN);
  241. memcpy(src, skb->data + ETH_ALEN, ETH_ALEN);
  242. /* Advance the SKB to the start of the payload */
  243. skb_pull(skb, sizeof(struct ethhdr));
  244. /* Determine total amount of storage required for TXB packets */
  245. bytes = skb->len + SNAP_SIZE + sizeof(u16);
  246. if (host_encrypt || host_build_iv)
  247. fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA |
  248. IEEE80211_FCTL_PROTECTED;
  249. else
  250. fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA;
  251. if (ieee->iw_mode == IW_MODE_INFRA) {
  252. fc |= IEEE80211_FCTL_TODS;
  253. /* To DS: Addr1 = BSSID, Addr2 = SA, Addr3 = DA */
  254. memcpy(header.addr1, ieee->bssid, ETH_ALEN);
  255. memcpy(header.addr2, src, ETH_ALEN);
  256. memcpy(header.addr3, dest, ETH_ALEN);
  257. } else if (ieee->iw_mode == IW_MODE_ADHOC) {
  258. /* not From/To DS: Addr1 = DA, Addr2 = SA, Addr3 = BSSID */
  259. memcpy(header.addr1, dest, ETH_ALEN);
  260. memcpy(header.addr2, src, ETH_ALEN);
  261. memcpy(header.addr3, ieee->bssid, ETH_ALEN);
  262. }
  263. header.frame_ctl = cpu_to_le16(fc);
  264. hdr_len = IEEE80211_3ADDR_LEN;
  265. /* Encrypt msdu first on the whole data packet. */
  266. if ((host_encrypt || host_encrypt_msdu) &&
  267. crypt && crypt->ops && crypt->ops->encrypt_msdu) {
  268. int res = 0;
  269. int len = bytes + hdr_len + crypt->ops->extra_msdu_prefix_len +
  270. crypt->ops->extra_msdu_postfix_len;
  271. struct sk_buff *skb_new = dev_alloc_skb(len);
  272. if (unlikely(!skb_new))
  273. goto failed;
  274. skb_reserve(skb_new, crypt->ops->extra_msdu_prefix_len);
  275. memcpy(skb_put(skb_new, hdr_len), &header, hdr_len);
  276. snapped = 1;
  277. ieee80211_copy_snap(skb_put(skb_new, SNAP_SIZE + sizeof(u16)),
  278. ether_type);
  279. memcpy(skb_put(skb_new, skb->len), skb->data, skb->len);
  280. res = crypt->ops->encrypt_msdu(skb_new, hdr_len, crypt->priv);
  281. if (res < 0) {
  282. IEEE80211_ERROR("msdu encryption failed\n");
  283. dev_kfree_skb_any(skb_new);
  284. goto failed;
  285. }
  286. dev_kfree_skb_any(skb);
  287. skb = skb_new;
  288. bytes += crypt->ops->extra_msdu_prefix_len +
  289. crypt->ops->extra_msdu_postfix_len;
  290. skb_pull(skb, hdr_len);
  291. }
  292. if (host_encrypt || ieee->host_open_frag) {
  293. /* Determine fragmentation size based on destination (multicast
  294. * and broadcast are not fragmented) */
  295. if (is_multicast_ether_addr(dest) ||
  296. is_broadcast_ether_addr(dest))
  297. frag_size = MAX_FRAG_THRESHOLD;
  298. else
  299. frag_size = ieee->fts;
  300. /* Determine amount of payload per fragment. Regardless of if
  301. * this stack is providing the full 802.11 header, one will
  302. * eventually be affixed to this fragment -- so we must account
  303. * for it when determining the amount of payload space. */
  304. bytes_per_frag = frag_size - IEEE80211_3ADDR_LEN;
  305. if (ieee->config &
  306. (CFG_IEEE80211_COMPUTE_FCS | CFG_IEEE80211_RESERVE_FCS))
  307. bytes_per_frag -= IEEE80211_FCS_LEN;
  308. /* Each fragment may need to have room for encryptiong
  309. * pre/postfix */
  310. if (host_encrypt)
  311. bytes_per_frag -= crypt->ops->extra_mpdu_prefix_len +
  312. crypt->ops->extra_mpdu_postfix_len;
  313. /* Number of fragments is the total
  314. * bytes_per_frag / payload_per_fragment */
  315. nr_frags = bytes / bytes_per_frag;
  316. bytes_last_frag = bytes % bytes_per_frag;
  317. if (bytes_last_frag)
  318. nr_frags++;
  319. else
  320. bytes_last_frag = bytes_per_frag;
  321. } else {
  322. nr_frags = 1;
  323. bytes_per_frag = bytes_last_frag = bytes;
  324. frag_size = bytes + IEEE80211_3ADDR_LEN;
  325. }
  326. rts_required = (frag_size > ieee->rts
  327. && ieee->config & CFG_IEEE80211_RTS);
  328. if (rts_required)
  329. nr_frags++;
  330. /* When we allocate the TXB we allocate enough space for the reserve
  331. * and full fragment bytes (bytes_per_frag doesn't include prefix,
  332. * postfix, header, FCS, etc.) */
  333. txb = ieee80211_alloc_txb(nr_frags, frag_size,
  334. ieee->tx_headroom, GFP_ATOMIC);
  335. if (unlikely(!txb)) {
  336. printk(KERN_WARNING "%s: Could not allocate TXB\n",
  337. ieee->dev->name);
  338. goto failed;
  339. }
  340. txb->encrypted = encrypt;
  341. if (host_encrypt)
  342. txb->payload_size = frag_size * (nr_frags - 1) +
  343. bytes_last_frag;
  344. else
  345. txb->payload_size = bytes;
  346. if (rts_required) {
  347. skb_frag = txb->fragments[0];
  348. frag_hdr =
  349. (struct ieee80211_hdr_3addr *)skb_put(skb_frag, hdr_len);
  350. /*
  351. * Set header frame_ctl to the RTS.
  352. */
  353. header.frame_ctl =
  354. cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_RTS);
  355. memcpy(frag_hdr, &header, hdr_len);
  356. /*
  357. * Restore header frame_ctl to the original data setting.
  358. */
  359. header.frame_ctl = cpu_to_le16(fc);
  360. if (ieee->config &
  361. (CFG_IEEE80211_COMPUTE_FCS | CFG_IEEE80211_RESERVE_FCS))
  362. skb_put(skb_frag, 4);
  363. txb->rts_included = 1;
  364. i = 1;
  365. } else
  366. i = 0;
  367. for (; i < nr_frags; i++) {
  368. skb_frag = txb->fragments[i];
  369. if (host_encrypt || host_build_iv)
  370. skb_reserve(skb_frag,
  371. crypt->ops->extra_mpdu_prefix_len);
  372. frag_hdr =
  373. (struct ieee80211_hdr_3addr *)skb_put(skb_frag, hdr_len);
  374. memcpy(frag_hdr, &header, hdr_len);
  375. /* If this is not the last fragment, then add the MOREFRAGS
  376. * bit to the frame control */
  377. if (i != nr_frags - 1) {
  378. frag_hdr->frame_ctl =
  379. cpu_to_le16(fc | IEEE80211_FCTL_MOREFRAGS);
  380. bytes = bytes_per_frag;
  381. } else {
  382. /* The last fragment takes the remaining length */
  383. bytes = bytes_last_frag;
  384. }
  385. if (i == 0 && !snapped) {
  386. ieee80211_copy_snap(skb_put
  387. (skb_frag, SNAP_SIZE + sizeof(u16)),
  388. ether_type);
  389. bytes -= SNAP_SIZE + sizeof(u16);
  390. }
  391. memcpy(skb_put(skb_frag, bytes), skb->data, bytes);
  392. /* Advance the SKB... */
  393. skb_pull(skb, bytes);
  394. /* Encryption routine will move the header forward in order
  395. * to insert the IV between the header and the payload */
  396. if (host_encrypt)
  397. ieee80211_encrypt_fragment(ieee, skb_frag, hdr_len);
  398. else if (host_build_iv) {
  399. struct ieee80211_crypt_data *crypt;
  400. crypt = ieee->crypt[ieee->tx_keyidx];
  401. atomic_inc(&crypt->refcnt);
  402. if (crypt->ops->build_iv)
  403. crypt->ops->build_iv(skb_frag, hdr_len,
  404. crypt->priv);
  405. atomic_dec(&crypt->refcnt);
  406. }
  407. if (ieee->config &
  408. (CFG_IEEE80211_COMPUTE_FCS | CFG_IEEE80211_RESERVE_FCS))
  409. skb_put(skb_frag, 4);
  410. }
  411. success:
  412. spin_unlock_irqrestore(&ieee->lock, flags);
  413. dev_kfree_skb_any(skb);
  414. if (txb) {
  415. int ret = (*ieee->hard_start_xmit) (txb, dev, priority);
  416. if (ret == 0) {
  417. stats->tx_packets++;
  418. stats->tx_bytes += txb->payload_size;
  419. return 0;
  420. }
  421. if (ret == NETDEV_TX_BUSY) {
  422. printk(KERN_ERR "%s: NETDEV_TX_BUSY returned; "
  423. "driver should report queue full via "
  424. "ieee_device->is_queue_full.\n",
  425. ieee->dev->name);
  426. }
  427. ieee80211_txb_free(txb);
  428. }
  429. return 0;
  430. failed:
  431. spin_unlock_irqrestore(&ieee->lock, flags);
  432. netif_stop_queue(dev);
  433. stats->tx_errors++;
  434. return 1;
  435. }
  436. /* Incoming 802.11 strucure is converted to a TXB
  437. * a block of 802.11 fragment packets (stored as skbs) */
  438. int ieee80211_tx_frame(struct ieee80211_device *ieee,
  439. struct ieee80211_hdr *frame, int len)
  440. {
  441. struct ieee80211_txb *txb = NULL;
  442. unsigned long flags;
  443. struct net_device_stats *stats = &ieee->stats;
  444. struct sk_buff *skb_frag;
  445. int priority = -1;
  446. spin_lock_irqsave(&ieee->lock, flags);
  447. /* If there is no driver handler to take the TXB, dont' bother
  448. * creating it... */
  449. if (!ieee->hard_start_xmit) {
  450. printk(KERN_WARNING "%s: No xmit handler.\n", ieee->dev->name);
  451. goto success;
  452. }
  453. if (unlikely(len < 24)) {
  454. printk(KERN_WARNING "%s: skb too small (%d).\n",
  455. ieee->dev->name, len);
  456. goto success;
  457. }
  458. /* When we allocate the TXB we allocate enough space for the reserve
  459. * and full fragment bytes (bytes_per_frag doesn't include prefix,
  460. * postfix, header, FCS, etc.) */
  461. txb = ieee80211_alloc_txb(1, len, ieee->tx_headroom, GFP_ATOMIC);
  462. if (unlikely(!txb)) {
  463. printk(KERN_WARNING "%s: Could not allocate TXB\n",
  464. ieee->dev->name);
  465. goto failed;
  466. }
  467. txb->encrypted = 0;
  468. txb->payload_size = len;
  469. skb_frag = txb->fragments[0];
  470. memcpy(skb_put(skb_frag, len), frame, len);
  471. if (ieee->config &
  472. (CFG_IEEE80211_COMPUTE_FCS | CFG_IEEE80211_RESERVE_FCS))
  473. skb_put(skb_frag, 4);
  474. success:
  475. spin_unlock_irqrestore(&ieee->lock, flags);
  476. if (txb) {
  477. if ((*ieee->hard_start_xmit) (txb, ieee->dev, priority) == 0) {
  478. stats->tx_packets++;
  479. stats->tx_bytes += txb->payload_size;
  480. return 0;
  481. }
  482. ieee80211_txb_free(txb);
  483. }
  484. return 0;
  485. failed:
  486. spin_unlock_irqrestore(&ieee->lock, flags);
  487. stats->tx_errors++;
  488. return 1;
  489. }
  490. EXPORT_SYMBOL(ieee80211_tx_frame);
  491. EXPORT_SYMBOL(ieee80211_txb_free);