Lines Matching refs:nc

81 	struct ncsi_channel *nc;  in ncsi_rsp_handler_cis()  local
85 ncsi_find_package_and_channel(ndp, rsp->rsp.common.channel, &np, &nc); in ncsi_rsp_handler_cis()
86 if (!nc) { in ncsi_rsp_handler_cis()
91 nc = ncsi_add_channel(np, id); in ncsi_rsp_handler_cis()
94 return nc ? 0 : -ENODEV; in ncsi_rsp_handler_cis()
128 struct ncsi_channel *nc; in ncsi_rsp_handler_dp() local
139 NCSI_FOR_EACH_CHANNEL(np, nc) { in ncsi_rsp_handler_dp()
140 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_dp()
141 nc->state = NCSI_CHANNEL_INACTIVE; in ncsi_rsp_handler_dp()
142 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_dp()
152 struct ncsi_channel *nc; in ncsi_rsp_handler_ec() local
158 NULL, &nc); in ncsi_rsp_handler_ec()
159 if (!nc) in ncsi_rsp_handler_ec()
162 ncm = &nc->modes[NCSI_MODE_ENABLE]; in ncsi_rsp_handler_ec()
174 struct ncsi_channel *nc; in ncsi_rsp_handler_dc() local
185 NULL, &nc); in ncsi_rsp_handler_dc()
186 if (!nc) in ncsi_rsp_handler_dc()
189 ncm = &nc->modes[NCSI_MODE_ENABLE]; in ncsi_rsp_handler_dc()
201 struct ncsi_channel *nc; in ncsi_rsp_handler_rc() local
207 NULL, &nc); in ncsi_rsp_handler_rc()
208 if (!nc) in ncsi_rsp_handler_rc()
212 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_rc()
213 nc->state = NCSI_CHANNEL_INACTIVE; in ncsi_rsp_handler_rc()
214 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_rc()
223 struct ncsi_channel *nc; in ncsi_rsp_handler_ecnt() local
229 NULL, &nc); in ncsi_rsp_handler_ecnt()
230 if (!nc) in ncsi_rsp_handler_ecnt()
233 ncm = &nc->modes[NCSI_MODE_TX_ENABLE]; in ncsi_rsp_handler_ecnt()
245 struct ncsi_channel *nc; in ncsi_rsp_handler_dcnt() local
251 NULL, &nc); in ncsi_rsp_handler_dcnt()
252 if (!nc) in ncsi_rsp_handler_dcnt()
255 ncm = &nc->modes[NCSI_MODE_TX_ENABLE]; in ncsi_rsp_handler_dcnt()
268 struct ncsi_channel *nc; in ncsi_rsp_handler_ae() local
274 NULL, &nc); in ncsi_rsp_handler_ae()
275 if (!nc) in ncsi_rsp_handler_ae()
279 ncm = &nc->modes[NCSI_MODE_AEN]; in ncsi_rsp_handler_ae()
297 struct ncsi_channel *nc; in ncsi_rsp_handler_sl() local
303 NULL, &nc); in ncsi_rsp_handler_sl()
304 if (!nc) in ncsi_rsp_handler_sl()
308 ncm = &nc->modes[NCSI_MODE_LINK]; in ncsi_rsp_handler_sl()
319 struct ncsi_channel *nc; in ncsi_rsp_handler_gls() local
326 NULL, &nc); in ncsi_rsp_handler_gls()
327 if (!nc) in ncsi_rsp_handler_gls()
330 ncm = &nc->modes[NCSI_MODE_LINK]; in ncsi_rsp_handler_gls()
339 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_gls()
340 nc->monitor.state = NCSI_CHANNEL_MONITOR_START; in ncsi_rsp_handler_gls()
341 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_gls()
351 struct ncsi_channel *nc; in ncsi_rsp_handler_svf() local
359 NULL, &nc); in ncsi_rsp_handler_svf()
360 if (!nc) in ncsi_rsp_handler_svf()
364 ncf = &nc->vlan_filter; in ncsi_rsp_handler_svf()
369 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_svf()
378 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_svf()
388 struct ncsi_channel *nc; in ncsi_rsp_handler_ev() local
394 NULL, &nc); in ncsi_rsp_handler_ev()
395 if (!nc) in ncsi_rsp_handler_ev()
399 ncm = &nc->modes[NCSI_MODE_VLAN]; in ncsi_rsp_handler_ev()
415 struct ncsi_channel *nc; in ncsi_rsp_handler_dv() local
421 NULL, &nc); in ncsi_rsp_handler_dv()
422 if (!nc) in ncsi_rsp_handler_dv()
426 ncm = &nc->modes[NCSI_MODE_VLAN]; in ncsi_rsp_handler_dv()
440 struct ncsi_channel *nc; in ncsi_rsp_handler_sma() local
451 NULL, &nc); in ncsi_rsp_handler_sma()
452 if (!nc) in ncsi_rsp_handler_sma()
460 ncf = &nc->mac_filter; in ncsi_rsp_handler_sma()
468 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_sma()
476 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_sma()
486 struct ncsi_channel *nc; in ncsi_rsp_handler_ebf() local
491 ncsi_find_package_and_channel(ndp, rsp->rsp.common.channel, NULL, &nc); in ncsi_rsp_handler_ebf()
492 if (!nc) in ncsi_rsp_handler_ebf()
496 ncm = &nc->modes[NCSI_MODE_BC]; in ncsi_rsp_handler_ebf()
512 struct ncsi_channel *nc; in ncsi_rsp_handler_dbf() local
517 NULL, &nc); in ncsi_rsp_handler_dbf()
518 if (!nc) in ncsi_rsp_handler_dbf()
522 ncm = &nc->modes[NCSI_MODE_BC]; in ncsi_rsp_handler_dbf()
538 struct ncsi_channel *nc; in ncsi_rsp_handler_egmf() local
544 NULL, &nc); in ncsi_rsp_handler_egmf()
545 if (!nc) in ncsi_rsp_handler_egmf()
549 ncm = &nc->modes[NCSI_MODE_MC]; in ncsi_rsp_handler_egmf()
565 struct ncsi_channel *nc; in ncsi_rsp_handler_dgmf() local
570 NULL, &nc); in ncsi_rsp_handler_dgmf()
571 if (!nc) in ncsi_rsp_handler_dgmf()
575 ncm = &nc->modes[NCSI_MODE_MC]; in ncsi_rsp_handler_dgmf()
591 struct ncsi_channel *nc; in ncsi_rsp_handler_snfc() local
597 NULL, &nc); in ncsi_rsp_handler_snfc()
598 if (!nc) in ncsi_rsp_handler_snfc()
602 ncm = &nc->modes[NCSI_MODE_FC]; in ncsi_rsp_handler_snfc()
796 struct ncsi_channel *nc; in ncsi_rsp_handler_gvi() local
803 NULL, &nc); in ncsi_rsp_handler_gvi()
804 if (!nc) in ncsi_rsp_handler_gvi()
808 ncv = &nc->version; in ncsi_rsp_handler_gvi()
824 struct ncsi_channel *nc; in ncsi_rsp_handler_gc() local
830 NULL, &nc); in ncsi_rsp_handler_gc()
831 if (!nc) in ncsi_rsp_handler_gc()
835 nc->caps[NCSI_CAP_GENERIC].cap = ntohl(rsp->cap) & in ncsi_rsp_handler_gc()
837 nc->caps[NCSI_CAP_BC].cap = ntohl(rsp->bc_cap) & in ncsi_rsp_handler_gc()
839 nc->caps[NCSI_CAP_MC].cap = ntohl(rsp->mc_cap) & in ncsi_rsp_handler_gc()
841 nc->caps[NCSI_CAP_BUFFER].cap = ntohl(rsp->buf_cap); in ncsi_rsp_handler_gc()
842 nc->caps[NCSI_CAP_AEN].cap = ntohl(rsp->aen_cap) & in ncsi_rsp_handler_gc()
844 nc->caps[NCSI_CAP_VLAN].cap = rsp->vlan_mode & in ncsi_rsp_handler_gc()
848 nc->mac_filter.addrs = kzalloc(size, GFP_ATOMIC); in ncsi_rsp_handler_gc()
849 if (!nc->mac_filter.addrs) in ncsi_rsp_handler_gc()
851 nc->mac_filter.n_uc = rsp->uc_cnt; in ncsi_rsp_handler_gc()
852 nc->mac_filter.n_mc = rsp->mc_cnt; in ncsi_rsp_handler_gc()
853 nc->mac_filter.n_mixed = rsp->mixed_cnt; in ncsi_rsp_handler_gc()
855 nc->vlan_filter.vids = kcalloc(rsp->vlan_cnt, in ncsi_rsp_handler_gc()
856 sizeof(*nc->vlan_filter.vids), in ncsi_rsp_handler_gc()
858 if (!nc->vlan_filter.vids) in ncsi_rsp_handler_gc()
863 nc->vlan_filter.bitmap = U64_MAX; in ncsi_rsp_handler_gc()
864 nc->vlan_filter.n_vids = rsp->vlan_cnt; in ncsi_rsp_handler_gc()
875 struct ncsi_channel *nc; in ncsi_rsp_handler_gp() local
885 NULL, &nc); in ncsi_rsp_handler_gp()
886 if (!nc) in ncsi_rsp_handler_gp()
891 nc->modes[NCSI_MODE_BC].enable = 1; in ncsi_rsp_handler_gp()
892 nc->modes[NCSI_MODE_BC].data[0] = ntohl(rsp->bc_mode); in ncsi_rsp_handler_gp()
895 nc->modes[NCSI_MODE_ENABLE].enable = 1; in ncsi_rsp_handler_gp()
897 nc->modes[NCSI_MODE_TX_ENABLE].enable = 1; in ncsi_rsp_handler_gp()
899 nc->modes[NCSI_MODE_MC].enable = 1; in ncsi_rsp_handler_gp()
902 nc->modes[NCSI_MODE_LINK].enable = 1; in ncsi_rsp_handler_gp()
903 nc->modes[NCSI_MODE_LINK].data[0] = ntohl(rsp->link_mode); in ncsi_rsp_handler_gp()
904 nc->modes[NCSI_MODE_VLAN].enable = 1; in ncsi_rsp_handler_gp()
905 nc->modes[NCSI_MODE_VLAN].data[0] = rsp->vlan_mode; in ncsi_rsp_handler_gp()
906 nc->modes[NCSI_MODE_FC].enable = 1; in ncsi_rsp_handler_gp()
907 nc->modes[NCSI_MODE_FC].data[0] = rsp->fc_mode; in ncsi_rsp_handler_gp()
908 nc->modes[NCSI_MODE_AEN].enable = 1; in ncsi_rsp_handler_gp()
909 nc->modes[NCSI_MODE_AEN].data[0] = ntohl(rsp->aen_mode); in ncsi_rsp_handler_gp()
914 ncmf = &nc->mac_filter; in ncsi_rsp_handler_gp()
915 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_gp()
925 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_gp()
929 ncvf = &nc->vlan_filter; in ncsi_rsp_handler_gp()
931 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_gp()
940 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_gp()
949 struct ncsi_channel *nc; in ncsi_rsp_handler_gcps() local
955 NULL, &nc); in ncsi_rsp_handler_gcps()
956 if (!nc) in ncsi_rsp_handler_gcps()
960 ncs = &nc->stats; in ncsi_rsp_handler_gcps()
1010 struct ncsi_channel *nc; in ncsi_rsp_handler_gns() local
1016 NULL, &nc); in ncsi_rsp_handler_gns()
1017 if (!nc) in ncsi_rsp_handler_gns()
1021 ncs = &nc->stats; in ncsi_rsp_handler_gns()
1037 struct ncsi_channel *nc; in ncsi_rsp_handler_gnpts() local
1043 NULL, &nc); in ncsi_rsp_handler_gnpts()
1044 if (!nc) in ncsi_rsp_handler_gnpts()
1048 ncs = &nc->stats; in ncsi_rsp_handler_gnpts()
1106 struct ncsi_channel *nc; in ncsi_rsp_handler_netlink() local
1112 &np, &nc); in ncsi_rsp_handler_netlink()
1116 ret = ncsi_send_netlink_rsp(nr, np, nc); in ncsi_rsp_handler_netlink()