aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-10-28 12:05:25 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-28 12:05:25 -0400
commite5dfa9282f3db461a896a6692b529e1823ba98c6 (patch)
tree574d23cebc57c657373b0e1b6692c047aba8dd6e /drivers/s390/net/qeth.h
parent5dd962494f76fb3ef1196cd420b5d6260d7a3766 (diff)
parentb2ab040db85835e54c7559533df7f85902617926 (diff)
Merge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
Diffstat (limited to 'drivers/s390/net/qeth.h')
-rw-r--r--drivers/s390/net/qeth.h45
1 files changed, 42 insertions, 3 deletions
diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h
index 9963479ba89f..38a2441564d7 100644
--- a/drivers/s390/net/qeth.h
+++ b/drivers/s390/net/qeth.h
@@ -275,6 +275,10 @@ qeth_is_ipa_enabled(struct qeth_ipa_info *ipa, enum qeth_ipa_funcs func)
275 QETH_IDX_FUNC_LEVEL_IQD_ENA_IPAT, \ 275 QETH_IDX_FUNC_LEVEL_IQD_ENA_IPAT, \
276 QETH_IDX_FUNC_LEVEL_IQD_DIS_IPAT, \ 276 QETH_IDX_FUNC_LEVEL_IQD_DIS_IPAT, \
277 QETH_MAX_QUEUES,0x103}, \ 277 QETH_MAX_QUEUES,0x103}, \
278 {0x1731,0x06,0x1732,0x06,QETH_CARD_TYPE_OSN,0, \
279 QETH_IDX_FUNC_LEVEL_OSAE_ENA_IPAT, \
280 QETH_IDX_FUNC_LEVEL_OSAE_DIS_IPAT, \
281 QETH_MAX_QUEUES,0}, \
278 {0,0,0,0,0,0,0,0,0}} 282 {0,0,0,0,0,0,0,0,0}}
279 283
280#define QETH_REAL_CARD 1 284#define QETH_REAL_CARD 1
@@ -363,10 +367,22 @@ struct qeth_hdr_layer2 {
363 __u8 reserved2[16]; 367 __u8 reserved2[16];
364} __attribute__ ((packed)); 368} __attribute__ ((packed));
365 369
370struct qeth_hdr_osn {
371 __u8 id;
372 __u8 reserved;
373 __u16 seq_no;
374 __u16 reserved2;
375 __u16 control_flags;
376 __u16 pdu_length;
377 __u8 reserved3[18];
378 __u32 ccid;
379} __attribute__ ((packed));
380
366struct qeth_hdr { 381struct qeth_hdr {
367 union { 382 union {
368 struct qeth_hdr_layer2 l2; 383 struct qeth_hdr_layer2 l2;
369 struct qeth_hdr_layer3 l3; 384 struct qeth_hdr_layer3 l3;
385 struct qeth_hdr_osn osn;
370 } hdr; 386 } hdr;
371} __attribute__ ((packed)); 387} __attribute__ ((packed));
372 388
@@ -413,6 +429,7 @@ enum qeth_header_ids {
413 QETH_HEADER_TYPE_LAYER3 = 0x01, 429 QETH_HEADER_TYPE_LAYER3 = 0x01,
414 QETH_HEADER_TYPE_LAYER2 = 0x02, 430 QETH_HEADER_TYPE_LAYER2 = 0x02,
415 QETH_HEADER_TYPE_TSO = 0x03, 431 QETH_HEADER_TYPE_TSO = 0x03,
432 QETH_HEADER_TYPE_OSN = 0x04,
416}; 433};
417/* flags for qeth_hdr.ext_flags */ 434/* flags for qeth_hdr.ext_flags */
418#define QETH_HDR_EXT_VLAN_FRAME 0x01 435#define QETH_HDR_EXT_VLAN_FRAME 0x01
@@ -582,7 +599,6 @@ enum qeth_card_states {
582 * Protocol versions 599 * Protocol versions
583 */ 600 */
584enum qeth_prot_versions { 601enum qeth_prot_versions {
585 QETH_PROT_SNA = 0x0001,
586 QETH_PROT_IPV4 = 0x0004, 602 QETH_PROT_IPV4 = 0x0004,
587 QETH_PROT_IPV6 = 0x0006, 603 QETH_PROT_IPV6 = 0x0006,
588}; 604};
@@ -761,6 +777,11 @@ enum qeth_threads {
761 QETH_RECOVER_THREAD = 2, 777 QETH_RECOVER_THREAD = 2,
762}; 778};
763 779
780struct qeth_osn_info {
781 int (*assist_cb)(struct net_device *dev, void *data);
782 int (*data_cb)(struct sk_buff *skb);
783};
784
764struct qeth_card { 785struct qeth_card {
765 struct list_head list; 786 struct list_head list;
766 enum qeth_card_states state; 787 enum qeth_card_states state;
@@ -803,6 +824,7 @@ struct qeth_card {
803 int use_hard_stop; 824 int use_hard_stop;
804 int (*orig_hard_header)(struct sk_buff *,struct net_device *, 825 int (*orig_hard_header)(struct sk_buff *,struct net_device *,
805 unsigned short,void *,void *,unsigned); 826 unsigned short,void *,void *,unsigned);
827 struct qeth_osn_info osn_info;
806}; 828};
807 829
808struct qeth_card_list_struct { 830struct qeth_card_list_struct {
@@ -916,10 +938,12 @@ qeth_get_hlen(__u8 link_type)
916static inline unsigned short 938static inline unsigned short
917qeth_get_netdev_flags(struct qeth_card *card) 939qeth_get_netdev_flags(struct qeth_card *card)
918{ 940{
919 if (card->options.layer2) 941 if (card->options.layer2 &&
942 (card->info.type == QETH_CARD_TYPE_OSAE))
920 return 0; 943 return 0;
921 switch (card->info.type) { 944 switch (card->info.type) {
922 case QETH_CARD_TYPE_IQD: 945 case QETH_CARD_TYPE_IQD:
946 case QETH_CARD_TYPE_OSN:
923 return IFF_NOARP; 947 return IFF_NOARP;
924#ifdef CONFIG_QETH_IPV6 948#ifdef CONFIG_QETH_IPV6
925 default: 949 default:
@@ -956,9 +980,10 @@ static inline int
956qeth_get_max_mtu_for_card(int cardtype) 980qeth_get_max_mtu_for_card(int cardtype)
957{ 981{
958 switch (cardtype) { 982 switch (cardtype) {
983
959 case QETH_CARD_TYPE_UNKNOWN: 984 case QETH_CARD_TYPE_UNKNOWN:
960 return 61440;
961 case QETH_CARD_TYPE_OSAE: 985 case QETH_CARD_TYPE_OSAE:
986 case QETH_CARD_TYPE_OSN:
962 return 61440; 987 return 61440;
963 case QETH_CARD_TYPE_IQD: 988 case QETH_CARD_TYPE_IQD:
964 return 57344; 989 return 57344;
@@ -1004,6 +1029,7 @@ qeth_mtu_is_valid(struct qeth_card * card, int mtu)
1004 case QETH_CARD_TYPE_IQD: 1029 case QETH_CARD_TYPE_IQD:
1005 return ((mtu >= 576) && 1030 return ((mtu >= 576) &&
1006 (mtu <= card->info.max_mtu + 4096 - 32)); 1031 (mtu <= card->info.max_mtu + 4096 - 32));
1032 case QETH_CARD_TYPE_OSN:
1007 case QETH_CARD_TYPE_UNKNOWN: 1033 case QETH_CARD_TYPE_UNKNOWN:
1008 default: 1034 default:
1009 return 1; 1035 return 1;
@@ -1015,6 +1041,7 @@ qeth_get_arphdr_type(int cardtype, int linktype)
1015{ 1041{
1016 switch (cardtype) { 1042 switch (cardtype) {
1017 case QETH_CARD_TYPE_OSAE: 1043 case QETH_CARD_TYPE_OSAE:
1044 case QETH_CARD_TYPE_OSN:
1018 switch (linktype) { 1045 switch (linktype) {
1019 case QETH_LINK_TYPE_LANE_TR: 1046 case QETH_LINK_TYPE_LANE_TR:
1020 case QETH_LINK_TYPE_HSTR: 1047 case QETH_LINK_TYPE_HSTR:
@@ -1182,4 +1209,16 @@ qeth_fill_header(struct qeth_card *, struct qeth_hdr *,
1182extern void 1209extern void
1183qeth_flush_buffers(struct qeth_qdio_out_q *, int, int, int); 1210qeth_flush_buffers(struct qeth_qdio_out_q *, int, int, int);
1184 1211
1212extern int
1213qeth_osn_assist(struct net_device *, void *, int);
1214
1215extern int
1216qeth_osn_register(unsigned char *read_dev_no,
1217 struct net_device **,
1218 int (*assist_cb)(struct net_device *, void *),
1219 int (*data_cb)(struct sk_buff *));
1220
1221extern void
1222qeth_osn_deregister(struct net_device *);
1223
1185#endif /* __QETH_H__ */ 1224#endif /* __QETH_H__ */