Lines Matching refs:nc

94 	struct ncsi_channel *nc;
98 ncsi_find_package_and_channel(ndp, rsp->rsp.common.channel, &np, &nc);
99 if (!nc) {
104 nc = ncsi_add_channel(np, id);
107 return nc ? 0 : -ENODEV;
141 struct ncsi_channel *nc;
152 NCSI_FOR_EACH_CHANNEL(np, nc) {
153 spin_lock_irqsave(&nc->lock, flags);
154 nc->state = NCSI_CHANNEL_INACTIVE;
155 spin_unlock_irqrestore(&nc->lock, flags);
165 struct ncsi_channel *nc;
171 NULL, &nc);
172 if (!nc)
175 ncm = &nc->modes[NCSI_MODE_ENABLE];
187 struct ncsi_channel *nc;
198 NULL, &nc);
199 if (!nc)
202 ncm = &nc->modes[NCSI_MODE_ENABLE];
214 struct ncsi_channel *nc;
220 NULL, &nc);
221 if (!nc)
225 spin_lock_irqsave(&nc->lock, flags);
226 nc->state = NCSI_CHANNEL_INACTIVE;
227 spin_unlock_irqrestore(&nc->lock, flags);
236 struct ncsi_channel *nc;
242 NULL, &nc);
243 if (!nc)
246 ncm = &nc->modes[NCSI_MODE_TX_ENABLE];
258 struct ncsi_channel *nc;
264 NULL, &nc);
265 if (!nc)
268 ncm = &nc->modes[NCSI_MODE_TX_ENABLE];
281 struct ncsi_channel *nc;
287 NULL, &nc);
288 if (!nc)
292 ncm = &nc->modes[NCSI_MODE_AEN];
310 struct ncsi_channel *nc;
316 NULL, &nc);
317 if (!nc)
321 ncm = &nc->modes[NCSI_MODE_LINK];
332 struct ncsi_channel *nc;
339 NULL, &nc);
340 if (!nc)
343 ncm = &nc->modes[NCSI_MODE_LINK];
352 spin_lock_irqsave(&nc->lock, flags);
353 nc->monitor.state = NCSI_CHANNEL_MONITOR_START;
354 spin_unlock_irqrestore(&nc->lock, flags);
364 struct ncsi_channel *nc;
372 NULL, &nc);
373 if (!nc)
377 ncf = &nc->vlan_filter;
382 spin_lock_irqsave(&nc->lock, flags);
391 spin_unlock_irqrestore(&nc->lock, flags);
401 struct ncsi_channel *nc;
407 NULL, &nc);
408 if (!nc)
412 ncm = &nc->modes[NCSI_MODE_VLAN];
428 struct ncsi_channel *nc;
434 NULL, &nc);
435 if (!nc)
439 ncm = &nc->modes[NCSI_MODE_VLAN];
453 struct ncsi_channel *nc;
464 NULL, &nc);
465 if (!nc)
473 ncf = &nc->mac_filter;
481 spin_lock_irqsave(&nc->lock, flags);
489 spin_unlock_irqrestore(&nc->lock, flags);
499 struct ncsi_channel *nc;
504 ncsi_find_package_and_channel(ndp, rsp->rsp.common.channel, NULL, &nc);
505 if (!nc)
509 ncm = &nc->modes[NCSI_MODE_BC];
525 struct ncsi_channel *nc;
530 NULL, &nc);
531 if (!nc)
535 ncm = &nc->modes[NCSI_MODE_BC];
551 struct ncsi_channel *nc;
557 NULL, &nc);
558 if (!nc)
562 ncm = &nc->modes[NCSI_MODE_MC];
578 struct ncsi_channel *nc;
583 NULL, &nc);
584 if (!nc)
588 ncm = &nc->modes[NCSI_MODE_MC];
604 struct ncsi_channel *nc;
610 NULL, &nc);
611 if (!nc)
615 ncm = &nc->modes[NCSI_MODE_FC];
760 struct ncsi_channel *nc;
767 NULL, &nc);
768 if (!nc)
778 ncv = &nc->version;
797 struct ncsi_channel *nc;
803 NULL, &nc);
804 if (!nc)
808 nc->caps[NCSI_CAP_GENERIC].cap = ntohl(rsp->cap) &
810 nc->caps[NCSI_CAP_BC].cap = ntohl(rsp->bc_cap) &
812 nc->caps[NCSI_CAP_MC].cap = ntohl(rsp->mc_cap) &
814 nc->caps[NCSI_CAP_BUFFER].cap = ntohl(rsp->buf_cap);
815 nc->caps[NCSI_CAP_AEN].cap = ntohl(rsp->aen_cap) &
817 nc->caps[NCSI_CAP_VLAN].cap = rsp->vlan_mode &
821 nc->mac_filter.addrs = kzalloc(size, GFP_ATOMIC);
822 if (!nc->mac_filter.addrs)
824 nc->mac_filter.n_uc = rsp->uc_cnt;
825 nc->mac_filter.n_mc = rsp->mc_cnt;
826 nc->mac_filter.n_mixed = rsp->mixed_cnt;
828 nc->vlan_filter.vids = kcalloc(rsp->vlan_cnt,
829 sizeof(*nc->vlan_filter.vids),
831 if (!nc->vlan_filter.vids)
836 nc->vlan_filter.bitmap = U64_MAX;
837 nc->vlan_filter.n_vids = rsp->vlan_cnt;
848 struct ncsi_channel *nc;
858 NULL, &nc);
859 if (!nc)
864 nc->modes[NCSI_MODE_BC].enable = 1;
865 nc->modes[NCSI_MODE_BC].data[0] = ntohl(rsp->bc_mode);
868 nc->modes[NCSI_MODE_ENABLE].enable = 1;
870 nc->modes[NCSI_MODE_TX_ENABLE].enable = 1;
872 nc->modes[NCSI_MODE_MC].enable = 1;
875 nc->modes[NCSI_MODE_LINK].enable = 1;
876 nc->modes[NCSI_MODE_LINK].data[0] = ntohl(rsp->link_mode);
877 nc->modes[NCSI_MODE_VLAN].enable = 1;
878 nc->modes[NCSI_MODE_VLAN].data[0] = rsp->vlan_mode;
879 nc->modes[NCSI_MODE_FC].enable = 1;
880 nc->modes[NCSI_MODE_FC].data[0] = rsp->fc_mode;
881 nc->modes[NCSI_MODE_AEN].enable = 1;
882 nc->modes[NCSI_MODE_AEN].data[0] = ntohl(rsp->aen_mode);
887 ncmf = &nc->mac_filter;
888 spin_lock_irqsave(&nc->lock, flags);
898 spin_unlock_irqrestore(&nc->lock, flags);
902 ncvf = &nc->vlan_filter;
904 spin_lock_irqsave(&nc->lock, flags);
913 spin_unlock_irqrestore(&nc->lock, flags);
922 struct ncsi_channel *nc;
928 NULL, &nc);
929 if (!nc)
933 ncs = &nc->stats;
983 struct ncsi_channel *nc;
989 NULL, &nc);
990 if (!nc)
994 ncs = &nc->stats;
1010 struct ncsi_channel *nc;
1016 NULL, &nc);
1017 if (!nc)
1021 ncs = &nc->stats;
1079 struct ncsi_channel *nc;
1085 &np, &nc);
1089 ret = ncsi_send_netlink_rsp(nr, np, nc);