18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright 2008 Cisco Systems, Inc.  All rights reserved.
38c2ecf20Sopenharmony_ci * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * This program is free software; you may redistribute it and/or modify
68c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License as published by
78c2ecf20Sopenharmony_ci * the Free Software Foundation; version 2 of the License.
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
108c2ecf20Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
118c2ecf20Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
128c2ecf20Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
138c2ecf20Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
148c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
158c2ecf20Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
168c2ecf20Sopenharmony_ci * SOFTWARE.
178c2ecf20Sopenharmony_ci */
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci#ifndef _FNIC_FIP_H_
208c2ecf20Sopenharmony_ci#define _FNIC_FIP_H_
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci#define FCOE_CTLR_START_DELAY    2000    /* ms after first adv. to choose FCF */
248c2ecf20Sopenharmony_ci#define FCOE_CTLR_FIPVLAN_TOV    2000    /* ms after FIP VLAN disc */
258c2ecf20Sopenharmony_ci#define FCOE_CTLR_MAX_SOL        8
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci#define FINC_MAX_FLOGI_REJECTS   8
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_cistruct vlan {
308c2ecf20Sopenharmony_ci	__be16 vid;
318c2ecf20Sopenharmony_ci	__be16 type;
328c2ecf20Sopenharmony_ci};
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci/*
358c2ecf20Sopenharmony_ci * VLAN entry.
368c2ecf20Sopenharmony_ci */
378c2ecf20Sopenharmony_cistruct fcoe_vlan {
388c2ecf20Sopenharmony_ci	struct list_head list;
398c2ecf20Sopenharmony_ci	u16 vid;		/* vlan ID */
408c2ecf20Sopenharmony_ci	u16 sol_count;		/* no. of sols sent */
418c2ecf20Sopenharmony_ci	u16 state;		/* state */
428c2ecf20Sopenharmony_ci};
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_cienum fip_vlan_state {
458c2ecf20Sopenharmony_ci	FIP_VLAN_AVAIL  = 0,	/* don't do anything */
468c2ecf20Sopenharmony_ci	FIP_VLAN_SENT   = 1,	/* sent */
478c2ecf20Sopenharmony_ci	FIP_VLAN_USED   = 2,	/* succeed */
488c2ecf20Sopenharmony_ci	FIP_VLAN_FAILED = 3,	/* failed to response */
498c2ecf20Sopenharmony_ci};
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_cistruct fip_vlan {
528c2ecf20Sopenharmony_ci	struct ethhdr eth;
538c2ecf20Sopenharmony_ci	struct fip_header fip;
548c2ecf20Sopenharmony_ci	struct {
558c2ecf20Sopenharmony_ci		struct fip_mac_desc mac;
568c2ecf20Sopenharmony_ci		struct fip_wwn_desc wwnn;
578c2ecf20Sopenharmony_ci	} desc;
588c2ecf20Sopenharmony_ci};
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci#endif  /* __FINC_FIP_H_ */
61