@@ -148,6 +148,7 @@ struct qeth_perf_stats {
148
148
unsigned int tx_csum ;
149
149
unsigned int tx_lin ;
150
150
unsigned int tx_linfail ;
151
+ unsigned int rx_csum ;
151
152
};
152
153
153
154
/* Routing stuff */
@@ -712,9 +713,6 @@ enum qeth_discipline_id {
712
713
713
714
struct qeth_discipline {
714
715
const struct device_type * devtype ;
715
- void (* start_poll )(struct ccw_device * , int , unsigned long );
716
- qdio_handler_t * input_handler ;
717
- qdio_handler_t * output_handler ;
718
716
int (* process_rx_buffer )(struct qeth_card * card , int budget , int * done );
719
717
int (* recover )(void * ptr );
720
718
int (* setup ) (struct ccwgroup_device * );
@@ -780,9 +778,9 @@ struct qeth_card {
780
778
struct qeth_card_options options ;
781
779
782
780
wait_queue_head_t wait_q ;
783
- spinlock_t vlanlock ;
784
781
spinlock_t mclock ;
785
782
unsigned long active_vlans [BITS_TO_LONGS (VLAN_N_VID )];
783
+ struct mutex vid_list_mutex ; /* vid_list */
786
784
struct list_head vid_list ;
787
785
DECLARE_HASHTABLE (mac_htable , 4 );
788
786
DECLARE_HASHTABLE (ip_htable , 4 );
@@ -867,6 +865,32 @@ static inline int qeth_get_ip_version(struct sk_buff *skb)
867
865
}
868
866
}
869
867
868
+ static inline void qeth_rx_csum (struct qeth_card * card , struct sk_buff * skb ,
869
+ u8 flags )
870
+ {
871
+ if ((card -> dev -> features & NETIF_F_RXCSUM ) &&
872
+ (flags & QETH_HDR_EXT_CSUM_TRANSP_REQ )) {
873
+ skb -> ip_summed = CHECKSUM_UNNECESSARY ;
874
+ if (card -> options .performance_stats )
875
+ card -> perf_stats .rx_csum ++ ;
876
+ } else {
877
+ skb -> ip_summed = CHECKSUM_NONE ;
878
+ }
879
+ }
880
+
881
+ static inline void qeth_tx_csum (struct sk_buff * skb , u8 * flags , int ipv )
882
+ {
883
+ * flags |= QETH_HDR_EXT_CSUM_TRANSP_REQ ;
884
+ if ((ipv == 4 && ip_hdr (skb )-> protocol == IPPROTO_UDP ) ||
885
+ (ipv == 6 && ipv6_hdr (skb )-> nexthdr == IPPROTO_UDP ))
886
+ * flags |= QETH_HDR_EXT_UDP ;
887
+ if (ipv == 4 ) {
888
+ /* some HW requires combined L3+L4 csum offload: */
889
+ * flags |= QETH_HDR_EXT_CSUM_HDR_REQ ;
890
+ ip_hdr (skb )-> check = 0 ;
891
+ }
892
+ }
893
+
870
894
static inline void qeth_put_buffer_pool_entry (struct qeth_card * card ,
871
895
struct qeth_buffer_pool_entry * entry )
872
896
{
@@ -879,6 +903,27 @@ static inline int qeth_is_diagass_supported(struct qeth_card *card,
879
903
return card -> info .diagass_support & (__u32 )cmd ;
880
904
}
881
905
906
+ int qeth_send_simple_setassparms_prot (struct qeth_card * card ,
907
+ enum qeth_ipa_funcs ipa_func ,
908
+ u16 cmd_code , long data ,
909
+ enum qeth_prot_versions prot );
910
+ /* IPv4 variant */
911
+ static inline int qeth_send_simple_setassparms (struct qeth_card * card ,
912
+ enum qeth_ipa_funcs ipa_func ,
913
+ u16 cmd_code , long data )
914
+ {
915
+ return qeth_send_simple_setassparms_prot (card , ipa_func , cmd_code ,
916
+ data , QETH_PROT_IPV4 );
917
+ }
918
+
919
+ static inline int qeth_send_simple_setassparms_v6 (struct qeth_card * card ,
920
+ enum qeth_ipa_funcs ipa_func ,
921
+ u16 cmd_code , long data )
922
+ {
923
+ return qeth_send_simple_setassparms_prot (card , ipa_func , cmd_code ,
924
+ data , QETH_PROT_IPV6 );
925
+ }
926
+
882
927
extern struct qeth_discipline qeth_l2_discipline ;
883
928
extern struct qeth_discipline qeth_l3_discipline ;
884
929
extern const struct attribute_group * qeth_generic_attr_groups [];
@@ -921,13 +966,7 @@ struct sk_buff *qeth_core_get_next_skb(struct qeth_card *,
921
966
struct qeth_qdio_buffer * , struct qdio_buffer_element * * , int * ,
922
967
struct qeth_hdr * * );
923
968
void qeth_schedule_recovery (struct qeth_card * );
924
- void qeth_qdio_start_poll (struct ccw_device * , int , unsigned long );
925
969
int qeth_poll (struct napi_struct * napi , int budget );
926
- void qeth_qdio_input_handler (struct ccw_device * ,
927
- unsigned int , unsigned int , int ,
928
- int , unsigned long );
929
- void qeth_qdio_output_handler (struct ccw_device * , unsigned int ,
930
- int , int , int , unsigned long );
931
970
void qeth_clear_ipacmd_list (struct qeth_card * );
932
971
int qeth_qdio_clear_card (struct qeth_card * , int );
933
972
void qeth_clear_working_pool_list (struct qeth_card * );
@@ -979,8 +1018,6 @@ int qeth_hw_trap(struct qeth_card *, enum qeth_diags_trap_action);
979
1018
int qeth_query_ipassists (struct qeth_card * , enum qeth_prot_versions prot );
980
1019
void qeth_trace_features (struct qeth_card * );
981
1020
void qeth_close_dev (struct qeth_card * );
982
- int qeth_send_simple_setassparms (struct qeth_card * , enum qeth_ipa_funcs ,
983
- __u16 , long );
984
1021
int qeth_send_setassparms (struct qeth_card * , struct qeth_cmd_buffer * , __u16 ,
985
1022
long ,
986
1023
int (* reply_cb )(struct qeth_card * ,
0 commit comments