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()
747 struct ncsi_channel *nc; in ncsi_rsp_handler_gvi() local
754 NULL, &nc); in ncsi_rsp_handler_gvi()
755 if (!nc) in ncsi_rsp_handler_gvi()
759 ncv = &nc->version; in ncsi_rsp_handler_gvi()
775 struct ncsi_channel *nc; in ncsi_rsp_handler_gc() local
781 NULL, &nc); in ncsi_rsp_handler_gc()
782 if (!nc) in ncsi_rsp_handler_gc()
786 nc->caps[NCSI_CAP_GENERIC].cap = ntohl(rsp->cap) & in ncsi_rsp_handler_gc()
788 nc->caps[NCSI_CAP_BC].cap = ntohl(rsp->bc_cap) & in ncsi_rsp_handler_gc()
790 nc->caps[NCSI_CAP_MC].cap = ntohl(rsp->mc_cap) & in ncsi_rsp_handler_gc()
792 nc->caps[NCSI_CAP_BUFFER].cap = ntohl(rsp->buf_cap); in ncsi_rsp_handler_gc()
793 nc->caps[NCSI_CAP_AEN].cap = ntohl(rsp->aen_cap) & in ncsi_rsp_handler_gc()
795 nc->caps[NCSI_CAP_VLAN].cap = rsp->vlan_mode & in ncsi_rsp_handler_gc()
799 nc->mac_filter.addrs = kzalloc(size, GFP_ATOMIC); in ncsi_rsp_handler_gc()
800 if (!nc->mac_filter.addrs) in ncsi_rsp_handler_gc()
802 nc->mac_filter.n_uc = rsp->uc_cnt; in ncsi_rsp_handler_gc()
803 nc->mac_filter.n_mc = rsp->mc_cnt; in ncsi_rsp_handler_gc()
804 nc->mac_filter.n_mixed = rsp->mixed_cnt; in ncsi_rsp_handler_gc()
806 nc->vlan_filter.vids = kcalloc(rsp->vlan_cnt, in ncsi_rsp_handler_gc()
807 sizeof(*nc->vlan_filter.vids), in ncsi_rsp_handler_gc()
809 if (!nc->vlan_filter.vids) in ncsi_rsp_handler_gc()
814 nc->vlan_filter.bitmap = U64_MAX; in ncsi_rsp_handler_gc()
815 nc->vlan_filter.n_vids = rsp->vlan_cnt; in ncsi_rsp_handler_gc()
826 struct ncsi_channel *nc; in ncsi_rsp_handler_gp() local
836 NULL, &nc); in ncsi_rsp_handler_gp()
837 if (!nc) in ncsi_rsp_handler_gp()
842 nc->modes[NCSI_MODE_BC].enable = 1; in ncsi_rsp_handler_gp()
843 nc->modes[NCSI_MODE_BC].data[0] = ntohl(rsp->bc_mode); in ncsi_rsp_handler_gp()
846 nc->modes[NCSI_MODE_ENABLE].enable = 1; in ncsi_rsp_handler_gp()
848 nc->modes[NCSI_MODE_TX_ENABLE].enable = 1; in ncsi_rsp_handler_gp()
850 nc->modes[NCSI_MODE_MC].enable = 1; in ncsi_rsp_handler_gp()
853 nc->modes[NCSI_MODE_LINK].enable = 1; in ncsi_rsp_handler_gp()
854 nc->modes[NCSI_MODE_LINK].data[0] = ntohl(rsp->link_mode); in ncsi_rsp_handler_gp()
855 nc->modes[NCSI_MODE_VLAN].enable = 1; in ncsi_rsp_handler_gp()
856 nc->modes[NCSI_MODE_VLAN].data[0] = rsp->vlan_mode; in ncsi_rsp_handler_gp()
857 nc->modes[NCSI_MODE_FC].enable = 1; in ncsi_rsp_handler_gp()
858 nc->modes[NCSI_MODE_FC].data[0] = rsp->fc_mode; in ncsi_rsp_handler_gp()
859 nc->modes[NCSI_MODE_AEN].enable = 1; in ncsi_rsp_handler_gp()
860 nc->modes[NCSI_MODE_AEN].data[0] = ntohl(rsp->aen_mode); in ncsi_rsp_handler_gp()
865 ncmf = &nc->mac_filter; in ncsi_rsp_handler_gp()
866 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_gp()
876 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_gp()
880 ncvf = &nc->vlan_filter; in ncsi_rsp_handler_gp()
882 spin_lock_irqsave(&nc->lock, flags); in ncsi_rsp_handler_gp()
891 spin_unlock_irqrestore(&nc->lock, flags); in ncsi_rsp_handler_gp()
900 struct ncsi_channel *nc; in ncsi_rsp_handler_gcps() local
906 NULL, &nc); in ncsi_rsp_handler_gcps()
907 if (!nc) in ncsi_rsp_handler_gcps()
911 ncs = &nc->stats; in ncsi_rsp_handler_gcps()
961 struct ncsi_channel *nc; in ncsi_rsp_handler_gns() local
967 NULL, &nc); in ncsi_rsp_handler_gns()
968 if (!nc) in ncsi_rsp_handler_gns()
972 ncs = &nc->stats; in ncsi_rsp_handler_gns()
988 struct ncsi_channel *nc; in ncsi_rsp_handler_gnpts() local
994 NULL, &nc); in ncsi_rsp_handler_gnpts()
995 if (!nc) in ncsi_rsp_handler_gnpts()
999 ncs = &nc->stats; in ncsi_rsp_handler_gnpts()
1057 struct ncsi_channel *nc; in ncsi_rsp_handler_netlink() local
1063 &np, &nc); in ncsi_rsp_handler_netlink()
1067 ret = ncsi_send_netlink_rsp(nr, np, nc); in ncsi_rsp_handler_netlink()