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

Lines Matching refs:sap

2  * llc_core.c - Minimum needed routines for sap handling and module init/exit
30 * llc_sap_alloc - allocates and initializes sap.
32 * Allocates and initializes sap.
36 struct llc_sap *sap = kzalloc(sizeof(*sap), GFP_ATOMIC);
38 if (sap) {
39 sap->state = LLC_SAP_STATE_ACTIVE;
40 memcpy(sap->laddr.mac, llc_station_mac_sa, ETH_ALEN);
41 rwlock_init(&sap->sk_list.lock);
42 atomic_set(&sap->refcnt, 1);
44 return sap;
48 * llc_add_sap - add sap to station list
49 * @sap: Address of the sap
51 * Adds a sap to the LLC's station sap list.
53 static void llc_add_sap(struct llc_sap *sap)
55 list_add_tail(&sap->node, &llc_sap_list);
59 * llc_del_sap - del sap from station list
60 * @sap: Address of the sap
62 * Removes a sap to the LLC's station sap list.
64 static void llc_del_sap(struct llc_sap *sap)
67 list_del(&sap->node);
73 struct llc_sap* sap;
75 list_for_each_entry(sap, &llc_sap_list, node)
76 if (sap->laddr.lsap == sap_value)
78 sap = NULL;
80 return sap;
85 * @sap_value: sap to be found
87 * Searchs for a sap in the sap list of the LLC's station upon the sap ID.
88 * If the sap is found it will be refcounted and the user will have to do
90 * Returns the sap or %NULL if not found.
94 struct llc_sap* sap;
97 sap = __llc_sap_find(sap_value);
98 if (sap)
99 llc_sap_hold(sap);
101 return sap;
119 struct llc_sap *sap = NULL;
124 sap = llc_sap_alloc();
125 if (!sap)
127 sap->laddr.lsap = lsap;
128 sap->rcv_func = func;
129 llc_add_sap(sap);
132 return sap;
137 * @sap: SAP to be closed.
141 * Removes this sap from the list of saps in the station and then
142 * frees the memory for this sap.
144 void llc_sap_close(struct llc_sap *sap)
146 WARN_ON(!hlist_empty(&sap->sk_list.list));
147 llc_del_sap(sap);
148 kfree(sap);