1296152Sadrian/*- 2296152Sadrian * Copyright (c) 2016 Adrian Chadd <adrian@FreeBSD.org>. 3296152Sadrian * All rights reserved. 4296152Sadrian * 5296152Sadrian * Redistribution and use in source and binary forms, with or without 6296152Sadrian * modification, are permitted provided that the following conditions 7296152Sadrian * are met: 8296152Sadrian * 1. Redistributions of source code must retain the above copyright 9296152Sadrian * notice, this list of conditions and the following disclaimer, 10296152Sadrian * without modification. 11296152Sadrian * 2. Redistributions in binary form must reproduce at minimum a disclaimer 12296152Sadrian * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 13296152Sadrian * redistribution must be conditioned upon including a substantially 14296152Sadrian * similar Disclaimer requirement for further binary redistribution. 15296152Sadrian * 16296152Sadrian * NO WARRANTY 17296152Sadrian * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18296152Sadrian * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19296152Sadrian * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY 20296152Sadrian * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 21296152Sadrian * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 22296152Sadrian * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23296152Sadrian * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24296152Sadrian * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25296152Sadrian * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26296152Sadrian * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27296152Sadrian * THE POSSIBILITY OF SUCH DAMAGES. 28296152Sadrian * 29296152Sadrian * $FreeBSD$ 30296152Sadrian */ 31296152Sadrian#ifndef __ATH_CTRL_H__ 32296152Sadrian#define __ATH_CTRL_H__ 33296152Sadrian 34296152Sadrianstruct ath_stats; 35296152Sadrianstruct ath_diag; 36296152Sadrianstruct ath_tx_aggr_stats; 37296152Sadrianstruct ath_rateioctl; 38296152Sadrian 39296152Sadrianstruct ath_driver_req { 40296152Sadrian /* Open socket, or -1 */ 41296152Sadrian int s; 42296152Sadrian /* The interface name in question */ 43296152Sadrian char *ifname; 44296152Sadrian}; 45296152Sadrian 46296152Sadrianextern int ath_driver_req_init(struct ath_driver_req *req); 47296152Sadrianextern int ath_driver_req_open(struct ath_driver_req *req, const char *ifname); 48296152Sadrianextern int ath_driver_req_close(struct ath_driver_req *req); 49296152Sadrianextern int ath_driver_req_fetch_diag(struct ath_driver_req *req, 50296152Sadrian unsigned long cmd, struct ath_diag *ad); 51296152Sadrianextern int ath_driver_req_zero_stats(struct ath_driver_req *req); 52296152Sadrianextern int ath_driver_req_fetch_stats(struct ath_driver_req *req, 53296152Sadrian struct ath_stats *st); 54296152Sadrianextern int ath_drive_req_fetch_aggr_stats(struct ath_driver_req *req, 55296152Sadrian struct ath_tx_aggr_stats *tx); 56296152Sadrianextern int ath_drive_req_fetch_ratectrl_stats(struct ath_driver_req *req, 57296152Sadrian struct ath_rateioctl *r); 58296152Sadrian 59296152Sadrian#endif 60