• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/uwb/wlp/

Lines Matching refs:neighbor

8 void wlp_neighbor_init(struct wlp_neighbor_e *neighbor)
10 INIT_LIST_HEAD(&neighbor->wssid);
66 * Remove information about neighbor stored temporarily
69 * device enrolls in the neighbor's WSS. We do need to store this
72 * We are only interested in keeping neighbor WSS information if that
73 * neighbor is accepting enrollment.
77 void wlp_remove_neighbor_tmp_info(struct wlp_neighbor_e *neighbor)
81 if (!list_empty(&neighbor->wssid)) {
82 list_for_each_entry_safe(wssid_e, next, &neighbor->wssid,
95 if (neighbor->info != NULL) {
96 kfree(neighbor->info);
97 neighbor->info = NULL;
102 * Populate WLP neighborhood cache with neighbor information
104 * A new neighbor is found. If it is discoverable then we add it to the
113 struct wlp_neighbor_e *neighbor;
117 /* Add neighbor to cache for discovery */
118 neighbor = kzalloc(sizeof(*neighbor), GFP_KERNEL);
119 if (neighbor == NULL) {
121 "new neighbor. \n");
125 wlp_neighbor_init(neighbor);
127 neighbor->uwb_dev = dev;
128 list_add(&neighbor->node, &wlp->neighbors);
135 * Remove one neighbor from cache
138 void __wlp_neighbor_release(struct wlp_neighbor_e *neighbor)
143 &neighbor->wssid, node) {
147 uwb_dev_put(neighbor->uwb_dev);
148 list_del(&neighbor->node);
149 kfree(neighbor);
158 struct wlp_neighbor_e *neighbor, *next;
161 list_for_each_entry_safe(neighbor, next, &wlp->neighbors, node) {
162 __wlp_neighbor_release(neighbor);
177 * Send D1 message to neighbor, receive D2 message
179 * @neighbor: neighbor to which D1 message will be sent
185 * enrollment. If done for discovery the D1 message is sent to the neighbor
188 * case the D1 message is sent to the neighbor, the D2 response is parsed
194 int wlp_d1d2_exchange(struct wlp *wlp, struct wlp_neighbor_e *neighbor,
203 struct uwb_dev_addr *dev_addr = &neighbor->uwb_dev->dev_addr;
215 dev_err(dev, "Unable to send D1 frame to neighbor "
232 dev_err(dev, "Timeout while sending D1 to neighbor "
238 dev_err(dev, "Unable to discover/enroll neighbor %02x:%02x.\n",
249 dev_err(dev, "WLP: Unable to parse F0 from neighbor "
257 result = wlp_parse_d2_frame_to_cache(wlp, skb, neighbor);
260 "neighbor %02x:%02x for discovery.\n",
266 result = wlp_parse_d2_frame_to_enroll(wss, skb, neighbor,
270 "neighbor %02x:%02x for enrollment.\n",
285 * Enroll into WSS of provided WSSID by using neighbor as registrar
289 int wlp_enroll_neighbor(struct wlp *wlp, struct wlp_neighbor_e *neighbor,
295 struct uwb_dev_addr *dev_addr = &neighbor->uwb_dev->dev_addr;
299 result = wlp_d1d2_exchange(wlp, neighbor, wss, wssid);
307 "neighbor %02x:%02x. \n", buf,
319 "%s using neighbor %02x:%02x. \n",
330 * Discover WSS information of neighbor's active WSS
334 struct wlp_neighbor_e *neighbor)
336 return wlp_d1d2_exchange(wlp, neighbor, NULL, NULL);
341 * Each neighbor in the neighborhood cache is discoverable. Discover it.
345 * in neighbor cache, rest is just displayed to user and forgotten.
350 * The discovery of one neighbor does not affect the other, but if the
351 * discovery of a neighbor fails it is removed from the neighborhood cache.
358 struct wlp_neighbor_e *neighbor, *next;
360 list_for_each_entry_safe(neighbor, next, &wlp->neighbors, node) {
361 result = wlp_discover_neighbor(wlp, neighbor);
363 dev_err(dev, "WLP: Unable to discover neighbor "
365 neighbor->uwb_dev->dev_addr.data[1],
366 neighbor->uwb_dev->dev_addr.data[0]);
367 __wlp_neighbor_release(neighbor);
394 * If one neighbor fails during initial discovery (determining if it is a
395 * neighbor or not), we fail all - note that interaction with neighbor has
410 /* May have partial neighbor information, release all. */
429 * We handle events conservatively. If a neighbor goes off the air we
441 struct wlp_neighbor_e *neighbor, *next;
449 dev_err(dev, "WLP: Unable to add new neighbor "
457 list_for_each_entry_safe(neighbor, next, &wlp->neighbors, node) {
458 if (neighbor->uwb_dev == uwb_dev)
459 __wlp_neighbor_release(neighbor);