1cb6b8299SEric Joyner /****************************************************************************** 2cb6b8299SEric Joyner 3*f4cc2d17SEric Joyner Copyright (c) 2013-2018, Intel Corporation 4cb6b8299SEric Joyner All rights reserved. 5cb6b8299SEric Joyner 6cb6b8299SEric Joyner Redistribution and use in source and binary forms, with or without 7cb6b8299SEric Joyner modification, are permitted provided that the following conditions are met: 8cb6b8299SEric Joyner 9cb6b8299SEric Joyner 1. Redistributions of source code must retain the above copyright notice, 10cb6b8299SEric Joyner this list of conditions and the following disclaimer. 11cb6b8299SEric Joyner 12cb6b8299SEric Joyner 2. Redistributions in binary form must reproduce the above copyright 13cb6b8299SEric Joyner notice, this list of conditions and the following disclaimer in the 14cb6b8299SEric Joyner documentation and/or other materials provided with the distribution. 15cb6b8299SEric Joyner 16cb6b8299SEric Joyner 3. Neither the name of the Intel Corporation nor the names of its 17cb6b8299SEric Joyner contributors may be used to endorse or promote products derived from 18cb6b8299SEric Joyner this software without specific prior written permission. 19cb6b8299SEric Joyner 20cb6b8299SEric Joyner THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21cb6b8299SEric Joyner AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22cb6b8299SEric Joyner IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23cb6b8299SEric Joyner ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 24cb6b8299SEric Joyner LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25cb6b8299SEric Joyner CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26cb6b8299SEric Joyner SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27cb6b8299SEric Joyner INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28cb6b8299SEric Joyner CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29cb6b8299SEric Joyner ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30cb6b8299SEric Joyner POSSIBILITY OF SUCH DAMAGE. 31cb6b8299SEric Joyner 32cb6b8299SEric Joyner ******************************************************************************/ 33cb6b8299SEric Joyner /*$FreeBSD$*/ 34cb6b8299SEric Joyner 35cb6b8299SEric Joyner #ifndef _IXL_IW_INT_H_ 36cb6b8299SEric Joyner #define _IXL_IW_INT_H_ 37cb6b8299SEric Joyner 38cb6b8299SEric Joyner enum ixl_iw_pf_state { 39cb6b8299SEric Joyner IXL_IW_PF_STATE_OFF, 40cb6b8299SEric Joyner IXL_IW_PF_STATE_ON 41cb6b8299SEric Joyner }; 42cb6b8299SEric Joyner 43cb6b8299SEric Joyner struct ixl_iw_pf_entry_state { 44cb6b8299SEric Joyner enum ixl_iw_pf_state pf; 45cb6b8299SEric Joyner enum ixl_iw_pf_state iw_scheduled; 46cb6b8299SEric Joyner enum ixl_iw_pf_state iw_current; 47cb6b8299SEric Joyner }; 48cb6b8299SEric Joyner 49cb6b8299SEric Joyner struct ixl_iw_pf_entry { 50cb6b8299SEric Joyner LIST_ENTRY(ixl_iw_pf_entry) node; 51cb6b8299SEric Joyner struct ixl_pf *pf; 52cb6b8299SEric Joyner struct ixl_iw_pf_entry_state state; 53cb6b8299SEric Joyner struct ixl_iw_pf pf_info; 54cb6b8299SEric Joyner struct task iw_task; 55cb6b8299SEric Joyner }; 56cb6b8299SEric Joyner 57cb6b8299SEric Joyner LIST_HEAD(ixl_iw_pfs_head, ixl_iw_pf_entry); 58cb6b8299SEric Joyner struct ixl_iw_state { 59cb6b8299SEric Joyner struct ixl_iw_ops *ops; 60cb6b8299SEric Joyner bool registered; 61cb6b8299SEric Joyner struct ixl_iw_pfs_head pfs; 62cb6b8299SEric Joyner struct mtx mtx; 63cb6b8299SEric Joyner struct taskqueue *tq; 64cb6b8299SEric Joyner }; 65cb6b8299SEric Joyner 66cb6b8299SEric Joyner int ixl_iw_pf_init(struct ixl_pf *pf); 67cb6b8299SEric Joyner void ixl_iw_pf_stop(struct ixl_pf *pf); 68cb6b8299SEric Joyner int ixl_iw_pf_attach(struct ixl_pf *pf); 69cb6b8299SEric Joyner int ixl_iw_pf_detach(struct ixl_pf *pf); 70cb6b8299SEric Joyner 71cb6b8299SEric Joyner #endif /* _IXL_IW_INT_H_ */ 72