aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/uwb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/uwb.h')
-rw-r--r--include/linux/uwb.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/include/linux/uwb.h b/include/linux/uwb.h
index effd97998fd1..7d3ebf046f9a 100644
--- a/include/linux/uwb.h
+++ b/include/linux/uwb.h
@@ -355,6 +355,7 @@ struct uwb_rc {
355 u8 ctx_roll; 355 u8 ctx_roll;
356 356
357 int beaconing; /* Beaconing state [channel number] */ 357 int beaconing; /* Beaconing state [channel number] */
358 int beaconing_forced;
358 int scanning; 359 int scanning;
359 enum uwb_scan_type scan_type:3; 360 enum uwb_scan_type scan_type:3;
360 unsigned ready:1; 361 unsigned ready:1;
@@ -373,8 +374,8 @@ struct uwb_rc {
373 struct uwb_rc_cmd_set_ie *ies; 374 struct uwb_rc_cmd_set_ie *ies;
374 size_t ies_capacity; 375 size_t ies_capacity;
375 376
376 spinlock_t pal_lock;
377 struct list_head pals; 377 struct list_head pals;
378 int active_pals;
378 379
379 struct uwb_dbg *dbg; 380 struct uwb_dbg *dbg;
380}; 381};
@@ -382,11 +383,17 @@ struct uwb_rc {
382 383
383/** 384/**
384 * struct uwb_pal - a UWB PAL 385 * struct uwb_pal - a UWB PAL
385 * @name: descriptive name for this PAL (wushc, wlp, etc.). 386 * @name: descriptive name for this PAL (wusbhc, wlp, etc.).
386 * @device: a device for the PAL. Used to link the PAL and the radio 387 * @device: a device for the PAL. Used to link the PAL and the radio
387 * controller in sysfs. 388 * controller in sysfs.
389 * @rc: the radio controller the PAL uses.
390 * @channel_changed: called when the channel used by the radio changes.
391 * A channel of -1 means the channel has been stopped.
388 * @new_rsv: called when a peer requests a reservation (may be NULL if 392 * @new_rsv: called when a peer requests a reservation (may be NULL if
389 * the PAL cannot accept reservation requests). 393 * the PAL cannot accept reservation requests).
394 * @channel: channel being used by the PAL; 0 if the PAL isn't using
395 * the radio; -1 if the PAL wishes to use the radio but
396 * cannot.
390 * 397 *
391 * A Protocol Adaptation Layer (PAL) is a user of the WiMedia UWB 398 * A Protocol Adaptation Layer (PAL) is a user of the WiMedia UWB
392 * radio platform (e.g., WUSB, WLP or Bluetooth UWB AMP). 399 * radio platform (e.g., WUSB, WLP or Bluetooth UWB AMP).
@@ -405,12 +412,20 @@ struct uwb_pal {
405 struct list_head node; 412 struct list_head node;
406 const char *name; 413 const char *name;
407 struct device *device; 414 struct device *device;
415 struct uwb_rc *rc;
416
417 void (*channel_changed)(struct uwb_pal *pal, int channel);
408 void (*new_rsv)(struct uwb_pal *pal, struct uwb_rsv *rsv); 418 void (*new_rsv)(struct uwb_pal *pal, struct uwb_rsv *rsv);
419
420 int channel;
409}; 421};
410 422
411void uwb_pal_init(struct uwb_pal *pal); 423void uwb_pal_init(struct uwb_pal *pal);
412int uwb_pal_register(struct uwb_rc *rc, struct uwb_pal *pal); 424int uwb_pal_register(struct uwb_pal *pal);
413void uwb_pal_unregister(struct uwb_rc *rc, struct uwb_pal *pal); 425void uwb_pal_unregister(struct uwb_pal *pal);
426
427int uwb_radio_start(struct uwb_pal *pal);
428void uwb_radio_stop(struct uwb_pal *pal);
414 429
415/* 430/*
416 * General public API 431 * General public API