• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/net/skfp/

Lines Matching refs:sm

190 	smc->sm.smt_tid = 0 ;
198 smc->sm.pend[i] = 0 ;
199 smc->sm.please_reconnect = 0 ;
200 smc->sm.uniq_ticks = 0 ;
213 smt_timer_start(smc,&smc->sm.smt_timer, (u_long)1000000L,
226 count = ((time - smc->sm.last_tok_time[mac_index]) *
240 smc->sm.last_tok_time[mac_index] = time;
254 if (smc->sm.please_reconnect) {
255 smc->sm.please_reconnect -- ;
256 if (smc->sm.please_reconnect == 0) {
289 if (time - smc->sm.smt_last_lem >= TICKS_PER_SECOND*8) {
304 smc->sm.smt_last_lem = time ;
388 if (time - smc->sm.smt_last_notify >= (u_long)
396 if (!smc->sm.pend[SMT_TID_NIF])
397 smc->sm.pend[SMT_TID_NIF] = smt_get_tid(smc) ;
399 smc->sm.pend[SMT_TID_NIF], SMT_REQUEST,0) ;
400 smc->sm.smt_last_notify = time ;
406 if (smc->sm.smt_tvu &&
407 time - smc->sm.smt_tvu > 228*TICKS_PER_SECOND) {
409 smc->sm.smt_tvu = 0 ;
429 if (smc->sm.smt_tvd &&
430 time - smc->sm.smt_tvd > 228*TICKS_PER_SECOND) {
432 smc->sm.smt_tvd = 0 ;
452 if (time - smc->sm.last_tok_time[i] > 2*TICKS_PER_SECOND ){
458 smt_timer_start(smc,&smc->sm.smt_timer, (u_long)1000000L,
481 struct smt_header *sm ;
498 sm = smtod(mb,struct smt_header *) ;
500 hwm_conv_can(smc,(char *)sm,12) ;
503 if (is_individual(&sm->smt_dest) && !is_my_addr(smc,&sm->smt_dest)) {
508 smt_swap_para(sm,(int) mb->sm_len,1) ;
510 smt_type_name[m_fc(mb) & 0xf],sm) ;
511 DB_SMT("SMT : version %d, class %s\n",sm->smt_version,
512 smt_class_name[(sm->smt_class>LAST_CLASS)?0 : sm->smt_class]) ;
518 if (m_fc(mb) == FC_SMT_NSA && sm->smt_class == SMT_NIF &&
519 (sm->smt_type == SMT_ANNOUNCE || sm->smt_type == SMT_REQUEST)) {
520 smc->sba.sm = sm ;
530 addr_to_string(&sm->smt_source),0) ;
538 if (((sm->smt_class == SMT_ECF) && (sm->smt_len > SMT_MAX_ECHO_LEN)) ||
539 ((sm->smt_class != SMT_ECF) && (sm->smt_len > SMT_MAX_INFO_LEN))) {
547 switch (sm->smt_class) {
552 if (sm->smt_version != SMT_VID)
556 if (sm->smt_version != SMT_VID_2)
562 sm->smt_version,addr_to_string(&sm->smt_source)) ;
567 if ((sm->smt_len > mb->sm_len - sizeof(struct smt_header)) ||
568 ((sm->smt_len & 3) && (sm->smt_class != SMT_ECF))) {
569 DB_SMT("SMT: info length error, len = %d\n",sm->smt_len,0) ;
574 switch (sm->smt_class) {
576 if (smt_check_para(smc,sm,plist_nif)) {
580 switch (sm->smt_type) {
584 && is_broadcast(&sm->smt_dest)) {
590 &sm->smt_source)) {
592 addr_to_string(&sm->smt_source),0) ;
601 sm->smt_source ;
607 smc->sm.smt_tvu = smt_get_time() ;
609 sm_to_para(smc,sm,SMT_P_STATE) ;
617 if ((sm->smt_type == SMT_REQUEST) &&
618 is_individual(&sm->smt_source) &&
622 addr_to_string(&sm->smt_source),0) ;
623 smt_send_nif(smc,&sm->smt_source,
625 sm->smt_tid,
631 addr_to_string(&sm->smt_source),0) ;
633 smc->sm.pend[SMT_TID_NIF] = 0 ;
643 if (sm->smt_tid == smc->sm.pend[SMT_TID_NIF]) {
644 smc->sm.pend[SMT_TID_NIF] = 0 ;
648 &sm->smt_source)) {
658 sm->smt_source ;
666 smc->sm.smt_tvd = smt_get_time() ;
674 else if (sm->smt_tid ==
675 smc->sm.pend[SMT_TID_NIF_TEST]) {
680 smc->sm.pend[SMT_TID_NIF],sm->smt_tid) ;
689 if (sm->smt_type != SMT_REQUEST)
692 addr_to_string(&sm->smt_source),0) ;
693 smt_send_sif_config(smc,&sm->smt_source,sm->smt_tid,local) ;
696 if (sm->smt_type != SMT_REQUEST)
699 addr_to_string(&sm->smt_source),0) ;
700 smt_send_sif_operation(smc,&sm->smt_source,sm->smt_tid,local) ;
703 switch (sm->smt_type) {
707 addr_to_string(&sm->smt_source),0) ;
708 if (sm_to_para(smc,sm,SMT_P_ECHODATA) == 0) {
712 if (sm->smt_tid == smc->sm.pend[SMT_TID_ECF]) {
715 else if (sm->smt_tid == smc->sm.pend[SMT_TID_ECF_UNA]) {
718 else if (sm->smt_tid == smc->sm.pend[SMT_TID_ECF_DNA]) {
723 smc->sm.pend[SMT_TID_ECF],
724 sm->smt_tid) ;
730 if (sm->smt_len && !sm_to_para(smc,sm,SMT_P_ECHODATA)) {
737 addr_to_string(&sm->smt_source),0) ;
740 sm->smt_dest = sm->smt_source ;
741 sm->smt_type = SMT_REPLY ;
742 dump_smt(smc,sm,"ECF REPLY") ;
756 fs = ess_raf_received_pack(smc,mb,sm,fs) ;
761 sba_raf_received_pack(smc,sm,fs) ;
768 if (sm->smt_type == SMT_REQUEST) {
775 if (sm->smt_type != SMT_REQUEST)
778 if (sm->smt_class == SMT_PMF_GET)
785 if ((sm->smt_class == SMT_PMF_SET) &&
786 !is_individual(&sm->smt_dest)) {
793 dump_smt(smc,sm,"SRF received") ;
796 if (sm->smt_type != SMT_REQUEST)
804 sm->smt_class, addr_to_string(&sm->smt_source)) ;
839 struct smt_header *sm ;
845 sm = smtod(mb,struct smt_header *) ;
846 sm->smt_source = smc->mib.m[MAC0].fddiMACSMTAddress ;
847 sm->smt_sid = smc->mib.fddiSMTStationId ;
849 smt_swap_para(sm,(int) mb->sm_len,0) ; /* swap para & header */
850 hwm_conv_can(smc,(char *)sm,12) ; /* convert SA and DA */
865 struct smt_header *sm ; /* header of offending frame */
870 sm = smtod(rej,struct smt_header *) ;
871 if (sm->smt_type != SMT_REQUEST)
875 addr_to_string(&sm->smt_source),reason) ;
887 rdf->smt.smt_tid = sm->smt_tid ; /* use TID from sm */
888 rdf->smt.smt_dest = sm->smt_source ; /* set dest = source */
919 smt_swap_para(sm,frame_len,0) ;
921 memcpy((char *) &rdf->refused.ref_header,(char *) sm,len) ;
966 smc->sm.pend[SMT_TID_NIF_TEST] = smt_get_tid(smc) ;
967 smt_send_nif(smc,dest, FC_SMT_INFO, smc->sm.pend[SMT_TID_NIF_TEST],
977 smc->sm.pend[SMT_TID_ECF] = smt_get_tid(smc) ;
978 smt_send_ecf(smc,dest, FC_SMT_INFO, smc->sm.pend[SMT_TID_ECF],
990 smc->sm.pend[dna ? SMT_TID_ECF_DNA : SMT_TID_ECF_UNA] =
1245 p[6] = (u_char)(smc->sm.uniq_ticks>>8) ;
1246 p[7] = (u_char)smc->sm.uniq_ticks ;
1250 if (utime != smc->sm.uniq_time) {
1251 smc->sm.uniq_ticks = 0 ;
1253 smc->sm.uniq_ticks++ ;
1254 smc->sm.uniq_time = utime ;
1561 while ((tid = ++(smc->sm.smt_tid) ^ SMT_TID_MAGIC) == 0)
1643 int smt_check_para(struct s_smc *smc, struct smt_header *sm,
1648 if (!sm_to_para(smc,sm,(int) *p)) {
1657 void *sm_to_para(struct s_smc *smc, struct smt_header *sm, int para)
1666 len = sm->smt_len ;
1667 p = (char *)(sm+1) ; /* pointer to info */
1806 void smt_swap_para(struct smt_header *sm, int len, int direction)
1816 /* printf("smt_swap_para sm %x len %d dir %d\n",
1817 sm,len,direction) ;
1819 smt_string_swap((char *)sm,SWAP_SMTHEADER,len) ;
1824 p = (char *) (sm + 1) ;
1904 void smt_swap_para(struct smt_header *sm, int len, int direction)
1907 SK_UNUSED(sm) ;