core.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679
  1. /*
  2. * Copyright (c) 2005-2011 Atheros Communications Inc.
  3. * Copyright (c) 2011-2013 Qualcomm Atheros, Inc.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any
  6. * purpose with or without fee is hereby granted, provided that the above
  7. * copyright notice and this permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  15. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. */
  17. #ifndef _CORE_H_
  18. #define _CORE_H_
  19. #include <linux/completion.h>
  20. #include <linux/if_ether.h>
  21. #include <linux/types.h>
  22. #include <linux/pci.h>
  23. #include <linux/uuid.h>
  24. #include <linux/time.h>
  25. #include "htt.h"
  26. #include "htc.h"
  27. #include "hw.h"
  28. #include "targaddrs.h"
  29. #include "wmi.h"
  30. #include "../ath.h"
  31. #include "../regd.h"
  32. #include "../dfs_pattern_detector.h"
  33. #include "spectral.h"
  34. #include "thermal.h"
  35. #define MS(_v, _f) (((_v) & _f##_MASK) >> _f##_LSB)
  36. #define SM(_v, _f) (((_v) << _f##_LSB) & _f##_MASK)
  37. #define WO(_f) ((_f##_OFFSET) >> 2)
  38. #define ATH10K_SCAN_ID 0
  39. #define WMI_READY_TIMEOUT (5 * HZ)
  40. #define ATH10K_FLUSH_TIMEOUT_HZ (5*HZ)
  41. #define ATH10K_NUM_CHANS 38
  42. /* Antenna noise floor */
  43. #define ATH10K_DEFAULT_NOISE_FLOOR -95
  44. #define ATH10K_MAX_NUM_MGMT_PENDING 128
  45. /* number of failed packets */
  46. #define ATH10K_KICKOUT_THRESHOLD 50
  47. /*
  48. * Use insanely high numbers to make sure that the firmware implementation
  49. * won't start, we have the same functionality already in hostapd. Unit
  50. * is seconds.
  51. */
  52. #define ATH10K_KEEPALIVE_MIN_IDLE 3747
  53. #define ATH10K_KEEPALIVE_MAX_IDLE 3895
  54. #define ATH10K_KEEPALIVE_MAX_UNRESPONSIVE 3900
  55. struct ath10k;
  56. enum ath10k_bus {
  57. ATH10K_BUS_PCI,
  58. };
  59. static inline const char *ath10k_bus_str(enum ath10k_bus bus)
  60. {
  61. switch (bus) {
  62. case ATH10K_BUS_PCI:
  63. return "pci";
  64. }
  65. return "unknown";
  66. }
  67. struct ath10k_skb_cb {
  68. dma_addr_t paddr;
  69. u8 eid;
  70. u8 vdev_id;
  71. struct {
  72. u8 tid;
  73. u16 freq;
  74. bool is_offchan;
  75. struct ath10k_htt_txbuf *txbuf;
  76. u32 txbuf_paddr;
  77. } __packed htt;
  78. struct {
  79. bool dtim_zero;
  80. bool deliver_cab;
  81. } bcn;
  82. } __packed;
  83. struct ath10k_skb_rxcb {
  84. dma_addr_t paddr;
  85. struct hlist_node hlist;
  86. };
  87. static inline struct ath10k_skb_cb *ATH10K_SKB_CB(struct sk_buff *skb)
  88. {
  89. BUILD_BUG_ON(sizeof(struct ath10k_skb_cb) >
  90. IEEE80211_TX_INFO_DRIVER_DATA_SIZE);
  91. return (struct ath10k_skb_cb *)&IEEE80211_SKB_CB(skb)->driver_data;
  92. }
  93. static inline struct ath10k_skb_rxcb *ATH10K_SKB_RXCB(struct sk_buff *skb)
  94. {
  95. BUILD_BUG_ON(sizeof(struct ath10k_skb_rxcb) > sizeof(skb->cb));
  96. return (struct ath10k_skb_rxcb *)skb->cb;
  97. }
  98. #define ATH10K_RXCB_SKB(rxcb) \
  99. container_of((void *)rxcb, struct sk_buff, cb)
  100. static inline u32 host_interest_item_address(u32 item_offset)
  101. {
  102. return QCA988X_HOST_INTEREST_ADDRESS + item_offset;
  103. }
  104. struct ath10k_bmi {
  105. bool done_sent;
  106. };
  107. struct ath10k_mem_chunk {
  108. void *vaddr;
  109. dma_addr_t paddr;
  110. u32 len;
  111. u32 req_id;
  112. };
  113. struct ath10k_wmi {
  114. enum ath10k_fw_wmi_op_version op_version;
  115. enum ath10k_htc_ep_id eid;
  116. struct completion service_ready;
  117. struct completion unified_ready;
  118. wait_queue_head_t tx_credits_wq;
  119. DECLARE_BITMAP(svc_map, WMI_SERVICE_MAX);
  120. struct wmi_cmd_map *cmd;
  121. struct wmi_vdev_param_map *vdev_param;
  122. struct wmi_pdev_param_map *pdev_param;
  123. const struct wmi_ops *ops;
  124. u32 num_mem_chunks;
  125. struct ath10k_mem_chunk mem_chunks[WMI_MAX_MEM_REQS];
  126. };
  127. struct ath10k_fw_stats_peer {
  128. struct list_head list;
  129. u8 peer_macaddr[ETH_ALEN];
  130. u32 peer_rssi;
  131. u32 peer_tx_rate;
  132. u32 peer_rx_rate; /* 10x only */
  133. };
  134. struct ath10k_fw_stats_pdev {
  135. struct list_head list;
  136. /* PDEV stats */
  137. s32 ch_noise_floor;
  138. u32 tx_frame_count;
  139. u32 rx_frame_count;
  140. u32 rx_clear_count;
  141. u32 cycle_count;
  142. u32 phy_err_count;
  143. u32 chan_tx_power;
  144. u32 ack_rx_bad;
  145. u32 rts_bad;
  146. u32 rts_good;
  147. u32 fcs_bad;
  148. u32 no_beacons;
  149. u32 mib_int_count;
  150. /* PDEV TX stats */
  151. s32 comp_queued;
  152. s32 comp_delivered;
  153. s32 msdu_enqued;
  154. s32 mpdu_enqued;
  155. s32 wmm_drop;
  156. s32 local_enqued;
  157. s32 local_freed;
  158. s32 hw_queued;
  159. s32 hw_reaped;
  160. s32 underrun;
  161. s32 tx_abort;
  162. s32 mpdus_requed;
  163. u32 tx_ko;
  164. u32 data_rc;
  165. u32 self_triggers;
  166. u32 sw_retry_failure;
  167. u32 illgl_rate_phy_err;
  168. u32 pdev_cont_xretry;
  169. u32 pdev_tx_timeout;
  170. u32 pdev_resets;
  171. u32 phy_underrun;
  172. u32 txop_ovf;
  173. /* PDEV RX stats */
  174. s32 mid_ppdu_route_change;
  175. s32 status_rcvd;
  176. s32 r0_frags;
  177. s32 r1_frags;
  178. s32 r2_frags;
  179. s32 r3_frags;
  180. s32 htt_msdus;
  181. s32 htt_mpdus;
  182. s32 loc_msdus;
  183. s32 loc_mpdus;
  184. s32 oversize_amsdu;
  185. s32 phy_errs;
  186. s32 phy_err_drop;
  187. s32 mpdu_errs;
  188. };
  189. struct ath10k_fw_stats {
  190. struct list_head pdevs;
  191. struct list_head peers;
  192. };
  193. struct ath10k_dfs_stats {
  194. u32 phy_errors;
  195. u32 pulses_total;
  196. u32 pulses_detected;
  197. u32 pulses_discarded;
  198. u32 radar_detected;
  199. };
  200. #define ATH10K_MAX_NUM_PEER_IDS (1 << 11) /* htt rx_desc limit */
  201. struct ath10k_peer {
  202. struct list_head list;
  203. int vdev_id;
  204. u8 addr[ETH_ALEN];
  205. DECLARE_BITMAP(peer_ids, ATH10K_MAX_NUM_PEER_IDS);
  206. /* protected by ar->data_lock */
  207. struct ieee80211_key_conf *keys[WMI_MAX_KEY_INDEX + 1];
  208. };
  209. struct ath10k_sta {
  210. struct ath10k_vif *arvif;
  211. /* the following are protected by ar->data_lock */
  212. u32 changed; /* IEEE80211_RC_* */
  213. u32 bw;
  214. u32 nss;
  215. u32 smps;
  216. struct work_struct update_wk;
  217. #ifdef CONFIG_MAC80211_DEBUGFS
  218. /* protected by conf_mutex */
  219. bool aggr_mode;
  220. #endif
  221. };
  222. #define ATH10K_VDEV_SETUP_TIMEOUT_HZ (5*HZ)
  223. enum ath10k_beacon_state {
  224. ATH10K_BEACON_SCHEDULED = 0,
  225. ATH10K_BEACON_SENDING,
  226. ATH10K_BEACON_SENT,
  227. };
  228. struct ath10k_vif {
  229. struct list_head list;
  230. u32 vdev_id;
  231. enum wmi_vdev_type vdev_type;
  232. enum wmi_vdev_subtype vdev_subtype;
  233. u32 beacon_interval;
  234. u32 dtim_period;
  235. struct sk_buff *beacon;
  236. /* protected by data_lock */
  237. enum ath10k_beacon_state beacon_state;
  238. void *beacon_buf;
  239. dma_addr_t beacon_paddr;
  240. struct ath10k *ar;
  241. struct ieee80211_vif *vif;
  242. bool is_started;
  243. bool is_up;
  244. bool spectral_enabled;
  245. u32 aid;
  246. u8 bssid[ETH_ALEN];
  247. struct ieee80211_key_conf *wep_keys[WMI_MAX_KEY_INDEX + 1];
  248. s8 def_wep_key_idx;
  249. u16 tx_seq_no;
  250. union {
  251. struct {
  252. u32 uapsd;
  253. } sta;
  254. struct {
  255. /* 127 stations; wmi limit */
  256. u8 tim_bitmap[16];
  257. u8 tim_len;
  258. u32 ssid_len;
  259. u8 ssid[IEEE80211_MAX_SSID_LEN];
  260. bool hidden_ssid;
  261. /* P2P_IE with NoA attribute for P2P_GO case */
  262. u32 noa_len;
  263. u8 *noa_data;
  264. } ap;
  265. } u;
  266. u8 fixed_rate;
  267. u8 fixed_nss;
  268. u8 force_sgi;
  269. bool use_cts_prot;
  270. int num_legacy_stations;
  271. int txpower;
  272. struct wmi_wmm_params_all_arg wmm_params;
  273. };
  274. struct ath10k_vif_iter {
  275. u32 vdev_id;
  276. struct ath10k_vif *arvif;
  277. };
  278. /* used for crash-dump storage, protected by data-lock */
  279. struct ath10k_fw_crash_data {
  280. bool crashed_since_read;
  281. uuid_le uuid;
  282. struct timespec timestamp;
  283. __le32 registers[REG_DUMP_COUNT_QCA988X];
  284. };
  285. struct ath10k_debug {
  286. struct dentry *debugfs_phy;
  287. struct ath10k_fw_stats fw_stats;
  288. struct completion fw_stats_complete;
  289. bool fw_stats_done;
  290. unsigned long htt_stats_mask;
  291. struct delayed_work htt_stats_dwork;
  292. struct ath10k_dfs_stats dfs_stats;
  293. struct ath_dfs_pool_stats dfs_pool_stats;
  294. /* protected by conf_mutex */
  295. u32 fw_dbglog_mask;
  296. u32 fw_dbglog_level;
  297. u32 pktlog_filter;
  298. u32 reg_addr;
  299. u32 nf_cal_period;
  300. u8 htt_max_amsdu;
  301. u8 htt_max_ampdu;
  302. struct ath10k_fw_crash_data *fw_crash_data;
  303. };
  304. enum ath10k_state {
  305. ATH10K_STATE_OFF = 0,
  306. ATH10K_STATE_ON,
  307. /* When doing firmware recovery the device is first powered down.
  308. * mac80211 is supposed to call in to start() hook later on. It is
  309. * however possible that driver unloading and firmware crash overlap.
  310. * mac80211 can wait on conf_mutex in stop() while the device is
  311. * stopped in ath10k_core_restart() work holding conf_mutex. The state
  312. * RESTARTED means that the device is up and mac80211 has started hw
  313. * reconfiguration. Once mac80211 is done with the reconfiguration we
  314. * set the state to STATE_ON in reconfig_complete(). */
  315. ATH10K_STATE_RESTARTING,
  316. ATH10K_STATE_RESTARTED,
  317. /* The device has crashed while restarting hw. This state is like ON
  318. * but commands are blocked in HTC and -ECOMM response is given. This
  319. * prevents completion timeouts and makes the driver more responsive to
  320. * userspace commands. This is also prevents recursive recovery. */
  321. ATH10K_STATE_WEDGED,
  322. /* factory tests */
  323. ATH10K_STATE_UTF,
  324. };
  325. enum ath10k_firmware_mode {
  326. /* the default mode, standard 802.11 functionality */
  327. ATH10K_FIRMWARE_MODE_NORMAL,
  328. /* factory tests etc */
  329. ATH10K_FIRMWARE_MODE_UTF,
  330. };
  331. enum ath10k_fw_features {
  332. /* wmi_mgmt_rx_hdr contains extra RSSI information */
  333. ATH10K_FW_FEATURE_EXT_WMI_MGMT_RX = 0,
  334. /* Firmware from 10X branch. Deprecated, don't use in new code. */
  335. ATH10K_FW_FEATURE_WMI_10X = 1,
  336. /* firmware support tx frame management over WMI, otherwise it's HTT */
  337. ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX = 2,
  338. /* Firmware does not support P2P */
  339. ATH10K_FW_FEATURE_NO_P2P = 3,
  340. /* Firmware 10.2 feature bit. The ATH10K_FW_FEATURE_WMI_10X feature
  341. * bit is required to be set as well. Deprecated, don't use in new
  342. * code.
  343. */
  344. ATH10K_FW_FEATURE_WMI_10_2 = 4,
  345. /* keep last */
  346. ATH10K_FW_FEATURE_COUNT,
  347. };
  348. enum ath10k_dev_flags {
  349. /* Indicates that ath10k device is during CAC phase of DFS */
  350. ATH10K_CAC_RUNNING,
  351. ATH10K_FLAG_CORE_REGISTERED,
  352. /* Device has crashed and needs to restart. This indicates any pending
  353. * waiters should immediately cancel instead of waiting for a time out.
  354. */
  355. ATH10K_FLAG_CRASH_FLUSH,
  356. };
  357. enum ath10k_cal_mode {
  358. ATH10K_CAL_MODE_FILE,
  359. ATH10K_CAL_MODE_OTP,
  360. ATH10K_CAL_MODE_DT,
  361. };
  362. static inline const char *ath10k_cal_mode_str(enum ath10k_cal_mode mode)
  363. {
  364. switch (mode) {
  365. case ATH10K_CAL_MODE_FILE:
  366. return "file";
  367. case ATH10K_CAL_MODE_OTP:
  368. return "otp";
  369. case ATH10K_CAL_MODE_DT:
  370. return "dt";
  371. }
  372. return "unknown";
  373. }
  374. enum ath10k_scan_state {
  375. ATH10K_SCAN_IDLE,
  376. ATH10K_SCAN_STARTING,
  377. ATH10K_SCAN_RUNNING,
  378. ATH10K_SCAN_ABORTING,
  379. };
  380. static inline const char *ath10k_scan_state_str(enum ath10k_scan_state state)
  381. {
  382. switch (state) {
  383. case ATH10K_SCAN_IDLE:
  384. return "idle";
  385. case ATH10K_SCAN_STARTING:
  386. return "starting";
  387. case ATH10K_SCAN_RUNNING:
  388. return "running";
  389. case ATH10K_SCAN_ABORTING:
  390. return "aborting";
  391. }
  392. return "unknown";
  393. }
  394. struct ath10k {
  395. struct ath_common ath_common;
  396. struct ieee80211_hw *hw;
  397. struct device *dev;
  398. u8 mac_addr[ETH_ALEN];
  399. enum ath10k_hw_rev hw_rev;
  400. u32 chip_id;
  401. u32 target_version;
  402. u8 fw_version_major;
  403. u32 fw_version_minor;
  404. u16 fw_version_release;
  405. u16 fw_version_build;
  406. u32 phy_capability;
  407. u32 hw_min_tx_power;
  408. u32 hw_max_tx_power;
  409. u32 ht_cap_info;
  410. u32 vht_cap_info;
  411. u32 num_rf_chains;
  412. DECLARE_BITMAP(fw_features, ATH10K_FW_FEATURE_COUNT);
  413. bool p2p;
  414. struct {
  415. enum ath10k_bus bus;
  416. const struct ath10k_hif_ops *ops;
  417. } hif;
  418. struct completion target_suspend;
  419. const struct ath10k_hw_regs *regs;
  420. struct ath10k_bmi bmi;
  421. struct ath10k_wmi wmi;
  422. struct ath10k_htc htc;
  423. struct ath10k_htt htt;
  424. struct ath10k_hw_params {
  425. u32 id;
  426. const char *name;
  427. u32 patch_load_addr;
  428. int uart_pin;
  429. struct ath10k_hw_params_fw {
  430. const char *dir;
  431. const char *fw;
  432. const char *otp;
  433. const char *board;
  434. size_t board_size;
  435. size_t board_ext_size;
  436. } fw;
  437. } hw_params;
  438. const struct firmware *board;
  439. const void *board_data;
  440. size_t board_len;
  441. const struct firmware *otp;
  442. const void *otp_data;
  443. size_t otp_len;
  444. const struct firmware *firmware;
  445. const void *firmware_data;
  446. size_t firmware_len;
  447. const struct firmware *cal_file;
  448. int fw_api;
  449. enum ath10k_cal_mode cal_mode;
  450. struct {
  451. struct completion started;
  452. struct completion completed;
  453. struct completion on_channel;
  454. struct delayed_work timeout;
  455. enum ath10k_scan_state state;
  456. bool is_roc;
  457. int vdev_id;
  458. int roc_freq;
  459. } scan;
  460. struct {
  461. struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
  462. } mac;
  463. /* should never be NULL; needed for regular htt rx */
  464. struct ieee80211_channel *rx_channel;
  465. /* valid during scan; needed for mgmt rx during scan */
  466. struct ieee80211_channel *scan_channel;
  467. /* current operating channel definition */
  468. struct cfg80211_chan_def chandef;
  469. unsigned long long free_vdev_map;
  470. bool monitor;
  471. int monitor_vdev_id;
  472. bool monitor_started;
  473. unsigned int filter_flags;
  474. unsigned long dev_flags;
  475. u32 dfs_block_radar_events;
  476. /* protected by conf_mutex */
  477. bool radar_enabled;
  478. int num_started_vdevs;
  479. /* Protected by conf-mutex */
  480. u8 supp_tx_chainmask;
  481. u8 supp_rx_chainmask;
  482. u8 cfg_tx_chainmask;
  483. u8 cfg_rx_chainmask;
  484. struct completion install_key_done;
  485. struct completion vdev_setup_done;
  486. struct workqueue_struct *workqueue;
  487. /* prevents concurrent FW reconfiguration */
  488. struct mutex conf_mutex;
  489. /* protects shared structure data */
  490. spinlock_t data_lock;
  491. struct list_head arvifs;
  492. struct list_head peers;
  493. wait_queue_head_t peer_mapping_wq;
  494. /* protected by conf_mutex */
  495. int num_peers;
  496. int num_stations;
  497. int max_num_peers;
  498. int max_num_stations;
  499. int max_num_vdevs;
  500. struct work_struct offchan_tx_work;
  501. struct sk_buff_head offchan_tx_queue;
  502. struct completion offchan_tx_completed;
  503. struct sk_buff *offchan_tx_skb;
  504. struct work_struct wmi_mgmt_tx_work;
  505. struct sk_buff_head wmi_mgmt_tx_queue;
  506. enum ath10k_state state;
  507. struct work_struct register_work;
  508. struct work_struct restart_work;
  509. /* cycle count is reported twice for each visited channel during scan.
  510. * access protected by data_lock */
  511. u32 survey_last_rx_clear_count;
  512. u32 survey_last_cycle_count;
  513. struct survey_info survey[ATH10K_NUM_CHANS];
  514. struct dfs_pattern_detector *dfs_detector;
  515. #ifdef CONFIG_ATH10K_DEBUGFS
  516. struct ath10k_debug debug;
  517. #endif
  518. struct {
  519. /* relay(fs) channel for spectral scan */
  520. struct rchan *rfs_chan_spec_scan;
  521. /* spectral_mode and spec_config are protected by conf_mutex */
  522. enum ath10k_spectral_mode mode;
  523. struct ath10k_spec_scan config;
  524. } spectral;
  525. struct {
  526. /* protected by conf_mutex */
  527. const struct firmware *utf;
  528. DECLARE_BITMAP(orig_fw_features, ATH10K_FW_FEATURE_COUNT);
  529. enum ath10k_fw_wmi_op_version orig_wmi_op_version;
  530. /* protected by data_lock */
  531. bool utf_monitor;
  532. } testmode;
  533. struct {
  534. /* protected by data_lock */
  535. u32 fw_crash_counter;
  536. u32 fw_warm_reset_counter;
  537. u32 fw_cold_reset_counter;
  538. } stats;
  539. struct ath10k_thermal thermal;
  540. /* must be last */
  541. u8 drv_priv[0] __aligned(sizeof(void *));
  542. };
  543. struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev,
  544. enum ath10k_bus bus,
  545. enum ath10k_hw_rev hw_rev,
  546. const struct ath10k_hif_ops *hif_ops);
  547. void ath10k_core_destroy(struct ath10k *ar);
  548. int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode);
  549. int ath10k_wait_for_suspend(struct ath10k *ar, u32 suspend_opt);
  550. void ath10k_core_stop(struct ath10k *ar);
  551. int ath10k_core_register(struct ath10k *ar, u32 chip_id);
  552. void ath10k_core_unregister(struct ath10k *ar);
  553. #endif /* _CORE_H_ */