Lines Matching full:nc
94 struct ncsi_channel *nc; in ncsi_rsp_handler_cis() local
98 ncsi_find_package_and_channel(ndp, rsp->rsp.common.channel, &np, &nc); in ncsi_rsp_handler_cis()
99 if (!nc) { in ncsi_rsp_handler_cis()
104 nc = ncsi_add_channel(np, id); in ncsi_rsp_handler_cis()
107 return nc ? 0 : -ENODEV; in ncsi_rsp_handler_cis()
141 struct ncsi_channel *nc; in ncsi_rsp_handler_dp() local
152 NCSI_FOR_EACH_CHANNEL(np, nc) { in ncsi_rsp_handler_dp()
153 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_dp()
154 nc->state = NCSI_CHANNEL_INACTIVE; in ncsi_rsp_handler_dp()
155 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_dp()
165 struct ncsi_channel *nc; in ncsi_rsp_handler_ec() local
171 NULL, &nc); in ncsi_rsp_handler_ec()
172 if (!nc) in ncsi_rsp_handler_ec()
175 ncm = &nc->modes[NCSI_MODE_ENABLE]; in ncsi_rsp_handler_ec()
187 struct ncsi_channel *nc; in ncsi_rsp_handler_dc() local
198 NULL, &nc); in ncsi_rsp_handler_dc()
199 if (!nc) in ncsi_rsp_handler_dc()
202 ncm = &nc->modes[NCSI_MODE_ENABLE]; in ncsi_rsp_handler_dc()
214 struct ncsi_channel *nc; in ncsi_rsp_handler_rc() local
220 NULL, &nc); in ncsi_rsp_handler_rc()
221 if (!nc) in ncsi_rsp_handler_rc()
225 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_rc()
226 nc->state = NCSI_CHANNEL_INACTIVE; in ncsi_rsp_handler_rc()
227 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_rc()
236 struct ncsi_channel *nc; in ncsi_rsp_handler_ecnt() local
242 NULL, &nc); in ncsi_rsp_handler_ecnt()
243 if (!nc) in ncsi_rsp_handler_ecnt()
246 ncm = &nc->modes[NCSI_MODE_TX_ENABLE]; in ncsi_rsp_handler_ecnt()
258 struct ncsi_channel *nc; in ncsi_rsp_handler_dcnt() local
264 NULL, &nc); in ncsi_rsp_handler_dcnt()
265 if (!nc) in ncsi_rsp_handler_dcnt()
268 ncm = &nc->modes[NCSI_MODE_TX_ENABLE]; in ncsi_rsp_handler_dcnt()
281 struct ncsi_channel *nc; in ncsi_rsp_handler_ae() local
287 NULL, &nc); in ncsi_rsp_handler_ae()
288 if (!nc) in ncsi_rsp_handler_ae()
292 ncm = &nc->modes[NCSI_MODE_AEN]; in ncsi_rsp_handler_ae()
310 struct ncsi_channel *nc; in ncsi_rsp_handler_sl() local
316 NULL, &nc); in ncsi_rsp_handler_sl()
317 if (!nc) in ncsi_rsp_handler_sl()
321 ncm = &nc->modes[NCSI_MODE_LINK]; in ncsi_rsp_handler_sl()
332 struct ncsi_channel *nc; in ncsi_rsp_handler_gls() local
339 NULL, &nc); in ncsi_rsp_handler_gls()
340 if (!nc) in ncsi_rsp_handler_gls()
343 ncm = &nc->modes[NCSI_MODE_LINK]; in ncsi_rsp_handler_gls()
352 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_gls()
353 nc->monitor.state = NCSI_CHANNEL_MONITOR_START; in ncsi_rsp_handler_gls()
354 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_gls()
364 struct ncsi_channel *nc; in ncsi_rsp_handler_svf() local
372 NULL, &nc); in ncsi_rsp_handler_svf()
373 if (!nc) in ncsi_rsp_handler_svf()
377 ncf = &nc->vlan_filter; in ncsi_rsp_handler_svf()
382 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_svf()
391 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_svf()
401 struct ncsi_channel *nc; in ncsi_rsp_handler_ev() local
407 NULL, &nc); in ncsi_rsp_handler_ev()
408 if (!nc) in ncsi_rsp_handler_ev()
412 ncm = &nc->modes[NCSI_MODE_VLAN]; in ncsi_rsp_handler_ev()
428 struct ncsi_channel *nc; in ncsi_rsp_handler_dv() local
434 NULL, &nc); in ncsi_rsp_handler_dv()
435 if (!nc) in ncsi_rsp_handler_dv()
439 ncm = &nc->modes[NCSI_MODE_VLAN]; in ncsi_rsp_handler_dv()
453 struct ncsi_channel *nc; in ncsi_rsp_handler_sma() local
464 NULL, &nc); in ncsi_rsp_handler_sma()
465 if (!nc) in ncsi_rsp_handler_sma()
473 ncf = &nc->mac_filter; in ncsi_rsp_handler_sma()
481 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_sma()
489 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_sma()
499 struct ncsi_channel *nc; in ncsi_rsp_handler_ebf() local
504 ncsi_find_package_and_channel(ndp, rsp->rsp.common.channel, NULL, &nc); in ncsi_rsp_handler_ebf()
505 if (!nc) in ncsi_rsp_handler_ebf()
509 ncm = &nc->modes[NCSI_MODE_BC]; in ncsi_rsp_handler_ebf()
525 struct ncsi_channel *nc; in ncsi_rsp_handler_dbf() local
530 NULL, &nc); in ncsi_rsp_handler_dbf()
531 if (!nc) in ncsi_rsp_handler_dbf()
535 ncm = &nc->modes[NCSI_MODE_BC]; in ncsi_rsp_handler_dbf()
551 struct ncsi_channel *nc; in ncsi_rsp_handler_egmf() local
557 NULL, &nc); in ncsi_rsp_handler_egmf()
558 if (!nc) in ncsi_rsp_handler_egmf()
562 ncm = &nc->modes[NCSI_MODE_MC]; in ncsi_rsp_handler_egmf()
578 struct ncsi_channel *nc; in ncsi_rsp_handler_dgmf() local
583 NULL, &nc); in ncsi_rsp_handler_dgmf()
584 if (!nc) in ncsi_rsp_handler_dgmf()
588 ncm = &nc->modes[NCSI_MODE_MC]; in ncsi_rsp_handler_dgmf()
604 struct ncsi_channel *nc; in ncsi_rsp_handler_snfc() local
610 NULL, &nc); in ncsi_rsp_handler_snfc()
611 if (!nc) in ncsi_rsp_handler_snfc()
615 ncm = &nc->modes[NCSI_MODE_FC]; in ncsi_rsp_handler_snfc()
760 struct ncsi_channel *nc; in ncsi_rsp_handler_gvi() local
767 NULL, &nc); in ncsi_rsp_handler_gvi()
768 if (!nc) in ncsi_rsp_handler_gvi()
778 ncv = &nc->version; in ncsi_rsp_handler_gvi()
797 struct ncsi_channel *nc; in ncsi_rsp_handler_gc() local
804 &np, &nc); in ncsi_rsp_handler_gc()
805 if (!nc) in ncsi_rsp_handler_gc()
809 nc->caps[NCSI_CAP_GENERIC].cap = ntohl(rsp->cap) & in ncsi_rsp_handler_gc()
811 nc->caps[NCSI_CAP_BC].cap = ntohl(rsp->bc_cap) & in ncsi_rsp_handler_gc()
813 nc->caps[NCSI_CAP_MC].cap = ntohl(rsp->mc_cap) & in ncsi_rsp_handler_gc()
815 nc->caps[NCSI_CAP_BUFFER].cap = ntohl(rsp->buf_cap); in ncsi_rsp_handler_gc()
816 nc->caps[NCSI_CAP_AEN].cap = ntohl(rsp->aen_cap) & in ncsi_rsp_handler_gc()
818 nc->caps[NCSI_CAP_VLAN].cap = rsp->vlan_mode & in ncsi_rsp_handler_gc()
822 nc->mac_filter.addrs = kzalloc(size, GFP_ATOMIC); in ncsi_rsp_handler_gc()
823 if (!nc->mac_filter.addrs) in ncsi_rsp_handler_gc()
825 nc->mac_filter.n_uc = rsp->uc_cnt; in ncsi_rsp_handler_gc()
826 nc->mac_filter.n_mc = rsp->mc_cnt; in ncsi_rsp_handler_gc()
827 nc->mac_filter.n_mixed = rsp->mixed_cnt; in ncsi_rsp_handler_gc()
829 nc->vlan_filter.vids = kcalloc(rsp->vlan_cnt, in ncsi_rsp_handler_gc()
830 sizeof(*nc->vlan_filter.vids), in ncsi_rsp_handler_gc()
832 if (!nc->vlan_filter.vids) in ncsi_rsp_handler_gc()
837 nc->vlan_filter.bitmap = U64_MAX; in ncsi_rsp_handler_gc()
838 nc->vlan_filter.n_vids = rsp->vlan_cnt; in ncsi_rsp_handler_gc()
850 struct ncsi_channel *nc; in ncsi_rsp_handler_gp() local
860 NULL, &nc); in ncsi_rsp_handler_gp()
861 if (!nc) in ncsi_rsp_handler_gp()
866 nc->modes[NCSI_MODE_BC].enable = 1; in ncsi_rsp_handler_gp()
867 nc->modes[NCSI_MODE_BC].data[0] = ntohl(rsp->bc_mode); in ncsi_rsp_handler_gp()
870 nc->modes[NCSI_MODE_ENABLE].enable = 1; in ncsi_rsp_handler_gp()
872 nc->modes[NCSI_MODE_TX_ENABLE].enable = 1; in ncsi_rsp_handler_gp()
874 nc->modes[NCSI_MODE_MC].enable = 1; in ncsi_rsp_handler_gp()
877 nc->modes[NCSI_MODE_LINK].enable = 1; in ncsi_rsp_handler_gp()
878 nc->modes[NCSI_MODE_LINK].data[0] = ntohl(rsp->link_mode); in ncsi_rsp_handler_gp()
879 nc->modes[NCSI_MODE_VLAN].enable = 1; in ncsi_rsp_handler_gp()
880 nc->modes[NCSI_MODE_VLAN].data[0] = rsp->vlan_mode; in ncsi_rsp_handler_gp()
881 nc->modes[NCSI_MODE_FC].enable = 1; in ncsi_rsp_handler_gp()
882 nc->modes[NCSI_MODE_FC].data[0] = rsp->fc_mode; in ncsi_rsp_handler_gp()
883 nc->modes[NCSI_MODE_AEN].enable = 1; in ncsi_rsp_handler_gp()
884 nc->modes[NCSI_MODE_AEN].data[0] = ntohl(rsp->aen_mode); in ncsi_rsp_handler_gp()
889 ncmf = &nc->mac_filter; in ncsi_rsp_handler_gp()
890 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_gp()
900 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_gp()
904 ncvf = &nc->vlan_filter; in ncsi_rsp_handler_gp()
906 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_gp()
915 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_gp()
924 struct ncsi_channel *nc; in ncsi_rsp_handler_gcps() local
930 NULL, &nc); in ncsi_rsp_handler_gcps()
931 if (!nc) in ncsi_rsp_handler_gcps()
935 ncs = &nc->stats; in ncsi_rsp_handler_gcps()
985 struct ncsi_channel *nc; in ncsi_rsp_handler_gns() local
991 NULL, &nc); in ncsi_rsp_handler_gns()
992 if (!nc) in ncsi_rsp_handler_gns()
996 ncs = &nc->stats; in ncsi_rsp_handler_gns()
1012 struct ncsi_channel *nc; in ncsi_rsp_handler_gnpts() local
1018 NULL, &nc); in ncsi_rsp_handler_gnpts()
1019 if (!nc) in ncsi_rsp_handler_gnpts()
1023 ncs = &nc->stats; in ncsi_rsp_handler_gnpts()
1081 struct ncsi_channel *nc; in ncsi_rsp_handler_netlink() local
1087 &np, &nc); in ncsi_rsp_handler_netlink()
1091 ret = ncsi_send_netlink_rsp(nr, np, nc); in ncsi_rsp_handler_netlink()