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