linux/net/bluetooth/hci_sysfs.c
<<
>>
Prefs
   1/* Bluetooth HCI driver model support. */
   2
   3#include <linux/debugfs.h>
   4#include <linux/module.h>
   5
   6#include <net/bluetooth/bluetooth.h>
   7#include <net/bluetooth/hci_core.h>
   8
   9static struct class *bt_class;
  10
  11struct dentry *bt_debugfs;
  12EXPORT_SYMBOL_GPL(bt_debugfs);
  13
  14static inline char *link_typetostr(int type)
  15{
  16        switch (type) {
  17        case ACL_LINK:
  18                return "ACL";
  19        case SCO_LINK:
  20                return "SCO";
  21        case ESCO_LINK:
  22                return "eSCO";
  23        case LE_LINK:
  24                return "LE";
  25        default:
  26                return "UNKNOWN";
  27        }
  28}
  29
  30static ssize_t show_link_type(struct device *dev,
  31                              struct device_attribute *attr, char *buf)
  32{
  33        struct hci_conn *conn = to_hci_conn(dev);
  34        return sprintf(buf, "%s\n", link_typetostr(conn->type));
  35}
  36
  37static ssize_t show_link_address(struct device *dev,
  38                                 struct device_attribute *attr, char *buf)
  39{
  40        struct hci_conn *conn = to_hci_conn(dev);
  41        return sprintf(buf, "%s\n", batostr(&conn->dst));
  42}
  43
  44static ssize_t show_link_features(struct device *dev,
  45                                  struct device_attribute *attr, char *buf)
  46{
  47        struct hci_conn *conn = to_hci_conn(dev);
  48
  49        return sprintf(buf, "0x%02x%02x%02x%02x%02x%02x%02x%02x\n",
  50                       conn->features[0], conn->features[1],
  51                       conn->features[2], conn->features[3],
  52                       conn->features[4], conn->features[5],
  53                       conn->features[6], conn->features[7]);
  54}
  55
  56#define LINK_ATTR(_name, _mode, _show, _store) \
  57struct device_attribute link_attr_##_name = __ATTR(_name, _mode, _show, _store)
  58
  59static LINK_ATTR(type, S_IRUGO, show_link_type, NULL);
  60static LINK_ATTR(address, S_IRUGO, show_link_address, NULL);
  61static LINK_ATTR(features, S_IRUGO, show_link_features, NULL);
  62
  63static struct attribute *bt_link_attrs[] = {
  64        &link_attr_type.attr,
  65        &link_attr_address.attr,
  66        &link_attr_features.attr,
  67        NULL
  68};
  69
  70static struct attribute_group bt_link_group = {
  71        .attrs = bt_link_attrs,
  72};
  73
  74static const struct attribute_group *bt_link_groups[] = {
  75        &bt_link_group,
  76        NULL
  77};
  78
  79static void bt_link_release(struct device *dev)
  80{
  81        struct hci_conn *conn = to_hci_conn(dev);
  82        kfree(conn);
  83}
  84
  85static struct device_type bt_link = {
  86        .name    = "link",
  87        .groups  = bt_link_groups,
  88        .release = bt_link_release,
  89};
  90
  91/*
  92 * The rfcomm tty device will possibly retain even when conn
  93 * is down, and sysfs doesn't support move zombie device,
  94 * so we should move the device before conn device is destroyed.
  95 */
  96static int __match_tty(struct device *dev, void *data)
  97{
  98        return !strncmp(dev_name(dev), "rfcomm", 6);
  99}
 100
 101void hci_conn_init_sysfs(struct hci_conn *conn)
 102{
 103        struct hci_dev *hdev = conn->hdev;
 104
 105        BT_DBG("conn %p", conn);
 106
 107        conn->dev.type = &bt_link;
 108        conn->dev.class = bt_class;
 109        conn->dev.parent = &hdev->dev;
 110
 111        device_initialize(&conn->dev);
 112}
 113
 114void hci_conn_add_sysfs(struct hci_conn *conn)
 115{
 116        struct hci_dev *hdev = conn->hdev;
 117
 118        BT_DBG("conn %p", conn);
 119
 120        dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle);
 121
 122        if (device_add(&conn->dev) < 0) {
 123                BT_ERR("Failed to register connection device");
 124                return;
 125        }
 126
 127        hci_dev_hold(hdev);
 128}
 129
 130void hci_conn_del_sysfs(struct hci_conn *conn)
 131{
 132        struct hci_dev *hdev = conn->hdev;
 133
 134        if (!device_is_registered(&conn->dev))
 135                return;
 136
 137        while (1) {
 138                struct device *dev;
 139
 140                dev = device_find_child(&conn->dev, NULL, __match_tty);
 141                if (!dev)
 142                        break;
 143                device_move(dev, NULL, DPM_ORDER_DEV_LAST);
 144                put_device(dev);
 145        }
 146
 147        device_del(&conn->dev);
 148        put_device(&conn->dev);
 149
 150        hci_dev_put(hdev);
 151}
 152
 153static inline char *host_bustostr(int bus)
 154{
 155        switch (bus) {
 156        case HCI_VIRTUAL:
 157                return "VIRTUAL";
 158        case HCI_USB:
 159                return "USB";
 160        case HCI_PCCARD:
 161                return "PCCARD";
 162        case HCI_UART:
 163                return "UART";
 164        case HCI_RS232:
 165                return "RS232";
 166        case HCI_PCI:
 167                return "PCI";
 168        case HCI_SDIO:
 169                return "SDIO";
 170        default:
 171                return "UNKNOWN";
 172        }
 173}
 174
 175static inline char *host_typetostr(int type)
 176{
 177        switch (type) {
 178        case HCI_BREDR:
 179                return "BR/EDR";
 180        case HCI_AMP:
 181                return "AMP";
 182        default:
 183                return "UNKNOWN";
 184        }
 185}
 186
 187static ssize_t show_bus(struct device *dev,
 188                        struct device_attribute *attr, char *buf)
 189{
 190        struct hci_dev *hdev = to_hci_dev(dev);
 191        return sprintf(buf, "%s\n", host_bustostr(hdev->bus));
 192}
 193
 194static ssize_t show_type(struct device *dev,
 195                         struct device_attribute *attr, char *buf)
 196{
 197        struct hci_dev *hdev = to_hci_dev(dev);
 198        return sprintf(buf, "%s\n", host_typetostr(hdev->dev_type));
 199}
 200
 201static ssize_t show_name(struct device *dev,
 202                         struct device_attribute *attr, char *buf)
 203{
 204        struct hci_dev *hdev = to_hci_dev(dev);
 205        char name[HCI_MAX_NAME_LENGTH + 1];
 206        int i;
 207
 208        for (i = 0; i < HCI_MAX_NAME_LENGTH; i++)
 209                name[i] = hdev->dev_name[i];
 210
 211        name[HCI_MAX_NAME_LENGTH] = '\0';
 212        return sprintf(buf, "%s\n", name);
 213}
 214
 215static ssize_t show_class(struct device *dev,
 216                          struct device_attribute *attr, char *buf)
 217{
 218        struct hci_dev *hdev = to_hci_dev(dev);
 219        return sprintf(buf, "0x%.2x%.2x%.2x\n", hdev->dev_class[2],
 220                       hdev->dev_class[1], hdev->dev_class[0]);
 221}
 222
 223static ssize_t show_address(struct device *dev,
 224                            struct device_attribute *attr, char *buf)
 225{
 226        struct hci_dev *hdev = to_hci_dev(dev);
 227        return sprintf(buf, "%s\n", batostr(&hdev->bdaddr));
 228}
 229
 230static ssize_t show_features(struct device *dev,
 231                             struct device_attribute *attr, char *buf)
 232{
 233        struct hci_dev *hdev = to_hci_dev(dev);
 234
 235        return sprintf(buf, "0x%02x%02x%02x%02x%02x%02x%02x%02x\n",
 236                       hdev->features[0], hdev->features[1],
 237                       hdev->features[2], hdev->features[3],
 238                       hdev->features[4], hdev->features[5],
 239                       hdev->features[6], hdev->features[7]);
 240}
 241
 242static ssize_t show_manufacturer(struct device *dev,
 243                                 struct device_attribute *attr, char *buf)
 244{
 245        struct hci_dev *hdev = to_hci_dev(dev);
 246        return sprintf(buf, "%d\n", hdev->manufacturer);
 247}
 248
 249static ssize_t show_hci_version(struct device *dev,
 250                                struct device_attribute *attr, char *buf)
 251{
 252        struct hci_dev *hdev = to_hci_dev(dev);
 253        return sprintf(buf, "%d\n", hdev->hci_ver);
 254}
 255
 256static ssize_t show_hci_revision(struct device *dev,
 257                                 struct device_attribute *attr, char *buf)
 258{
 259        struct hci_dev *hdev = to_hci_dev(dev);
 260        return sprintf(buf, "%d\n", hdev->hci_rev);
 261}
 262
 263static ssize_t show_idle_timeout(struct device *dev,
 264                                 struct device_attribute *attr, char *buf)
 265{
 266        struct hci_dev *hdev = to_hci_dev(dev);
 267        return sprintf(buf, "%d\n", hdev->idle_timeout);
 268}
 269
 270static ssize_t store_idle_timeout(struct device *dev,
 271                                  struct device_attribute *attr,
 272                                  const char *buf, size_t count)
 273{
 274        struct hci_dev *hdev = to_hci_dev(dev);
 275        unsigned int val;
 276        int rv;
 277
 278        rv = kstrtouint(buf, 0, &val);
 279        if (rv < 0)
 280                return rv;
 281
 282        if (val != 0 && (val < 500 || val > 3600000))
 283                return -EINVAL;
 284
 285        hdev->idle_timeout = val;
 286
 287        return count;
 288}
 289
 290static ssize_t show_sniff_max_interval(struct device *dev,
 291                                       struct device_attribute *attr, char *buf)
 292{
 293        struct hci_dev *hdev = to_hci_dev(dev);
 294        return sprintf(buf, "%d\n", hdev->sniff_max_interval);
 295}
 296
 297static ssize_t store_sniff_max_interval(struct device *dev,
 298                                        struct device_attribute *attr,
 299                                        const char *buf, size_t count)
 300{
 301        struct hci_dev *hdev = to_hci_dev(dev);
 302        u16 val;
 303        int rv;
 304
 305        rv = kstrtou16(buf, 0, &val);
 306        if (rv < 0)
 307                return rv;
 308
 309        if (val == 0 || val % 2 || val < hdev->sniff_min_interval)
 310                return -EINVAL;
 311
 312        hdev->sniff_max_interval = val;
 313
 314        return count;
 315}
 316
 317static ssize_t show_sniff_min_interval(struct device *dev,
 318                                       struct device_attribute *attr, char *buf)
 319{
 320        struct hci_dev *hdev = to_hci_dev(dev);
 321        return sprintf(buf, "%d\n", hdev->sniff_min_interval);
 322}
 323
 324static ssize_t store_sniff_min_interval(struct device *dev,
 325                                        struct device_attribute *attr,
 326                                        const char *buf, size_t count)
 327{
 328        struct hci_dev *hdev = to_hci_dev(dev);
 329        u16 val;
 330        int rv;
 331
 332        rv = kstrtou16(buf, 0, &val);
 333        if (rv < 0)
 334                return rv;
 335
 336        if (val == 0 || val % 2 || val > hdev->sniff_max_interval)
 337                return -EINVAL;
 338
 339        hdev->sniff_min_interval = val;
 340
 341        return count;
 342}
 343
 344static DEVICE_ATTR(bus, S_IRUGO, show_bus, NULL);
 345static DEVICE_ATTR(type, S_IRUGO, show_type, NULL);
 346static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
 347static DEVICE_ATTR(class, S_IRUGO, show_class, NULL);
 348static DEVICE_ATTR(address, S_IRUGO, show_address, NULL);
 349static DEVICE_ATTR(features, S_IRUGO, show_featuresress, NULL);
 313
hdprintf" class="sref">sprintf( *<show_featuresS_IRUGO, show_features5ref="+code=hdev" class="sref">hdev-&g1, buf"sref5       2"sref"code=buf" class="sref">buf"sref5       2"sref"code=buf" class="sref">buf"sref5       2"sref"code=buf" class="sref">buf"sref5       2"sref"code=buf" class="sref">buf"sref5       2"sref"code=buf" class="sref">buf"buf" class="sref">buf"buf" class="sref"show_class" class="sref">show_clam0uetooth/hci_sysfs.c#L328y_clam0uetooth/hci_sysfs.c#L328y_clam05f(,
buf"bufne" name="L349"> 349st" name="L237"> 237                       hdev->buf"buf" class="srefh/hci_sysfs.c#L253" id="L253" cla3s="li35" name="L343"> 343
 344static DEVICE_ATTRbuf"bufne" name="L val % 2 |ne"WUS"+code=DEVICE_ATne"WUS"class="sref">attr,
 325  9"> 349st" name=href="+code=show_idle_timeout" class="sref">show349"> 349st" n store="+code=features" f">buf"buf" class="srefh/hci_sysfs.c#L256" id="L256" cla3s="li3e" name="L256"> 256static DEVICE_ATTRsniff  2"sref"code=buf" class="sref">buf"bufne" name="L val % 2 |ne"WUS"+code=DEVICE_ATne"WUS"class="sref">attr,
 257  9"> 349st" name=href="+code=show_sniff_max_interval" class="sref">show_sniff349"> 349st" n store_sniff="+code=features" f">buf"buf" class="srefh/hci_sysfs.c#L258" id="L258" cla3s="li35" name="L348"> 348static DEVICE_ATTRsniff  2"sref"code=buf" class="sref">buf"bufne" name="L val % 2 |ne"WUS"+code=DEVICE_ATne"WUS"class="sref">attr,
 299  9"> 349st" name=href="+code=show_sniff_min_interval" class="sref">show_sniff349"> 349st" n store_sniff="+code=features" f">buf"buf" class="sreth/hci_sy3fs.c#L260" id="L260" cla3s="li36" name="L340"> 340
hdev> 328        strucef="+code=device_attribuss="sref">device_attributebt_hostass="dev[X_NAe="L327"> 327{
buf, 0, &amdevass=" href="+code=show_bdevass=" hre nam.a>        strucef="=device_attribuss="class="sref">attr,
buf, 0, &amdevass=" href="+code=show_tydevass=" href nam.a>        strucef="=device_attribuss="class="sref">attr,
buf, 0, &amdevass=" href="+code=show_nadevass=" href nam.a>        strucef="=device_attribuss="class="sref">attr,
buf, 0, &amdevass=" href="+code=show_cladevass=" href= nam.a>        strucef="=device_attribuss="class="sref">attr,
buf, 0, &amdevass=" href="+code=show_addredevass=" href="+ nam.a>        strucef="=device_attribuss="class="sref">attr,
buf, 0, &amdevass=" href="+code=show_featurdevass=" href="+c nam.a>        strucef="=device_attribuss="class="sref">attr,
buf, 0, &amdevass=" sfs.c#L315"a hr02>show_featdevass=" sfs.c#L315"a nam.a>        strucef="=device_attribuss="class="sref">attr,
buf, 0, &amdevass=" =buf" class="sref">buf"sredevass=" =buf" class nam.a>        strucef="=device_attribuss="class="sref">attr,
buf, 0, &amdevass=" =buf7"> 237            devass=" =buf7"> 237< nam.a>        strucef="=device_attribuss="class="sref">attr,
buf, 0, &amdevass=" ref="+code=store_idle_timeodevass=" ref="+code=s nam.a>        strucef="=device_attribuss="class="sref">attr,
buf, 0, &amdevass=" ref="+code=store_sniff_max_intervdevass=" ref="+code=store_s nam.a>        strucef="=device_attribuss="class="sref">attr,
buf, 0, &amdevass=" ref="+code=store_sniff_min_intervdevass=" ref="+code=store_s nam.a>        strucef="=device_attribuss="class="sref">attr,
hdev->attr,
buf"buf" class="sreth/hci_sy3fs.c#L276" id="L276" cla3s="li37" name="L316"> 316
bt_hostagroup=device_attribubt_hostagroup nameNAe="L327"> 327{
        strucef="ref="+code=address="<>dev_min_interval bt_hostass="devs="sref">attr,
buf"buf" class="sreth/hci_sy3fs.c#L280" id="L280" cla3s="li38" name="L340"> 340
hdev      > 328        strucef="+code_group=device_attribuss="sref"_group namece_attributebt_hostagroup bt_hostass="va3 > 3600000))
hdevVAL" clas3="sref">EINVAL;
 284
val;
        strucef="rreleas"li3e" name="L26rucef="rreleas" 348store_sniff_min_interval(struct  286
count;
 328        struct hci_dev *hdev = to_hci_dev( 288}
storekfreaam0uetooth/hci_sysfs. to_hci_dev( 289
bmodu&naam0uetooth/hci_sysfsTHIS_MODULEme="L271"ref">bTHIS_MODULEv" class="sref">to_hci_dev(dev,
buf)
 292{
 325  3s="li363 name="L332"ra>  3s="strucef="+code_group=deviceli3e" name="L26rucef="ibutebt_hostagroup=device_attribubt_hostage=dev" cl3ss="sref">dev);
sprintf(snif3_max_interval);
        strucef="rttribuss="sref"_group namece_attribute<;02x%02x%02x%02x%02xre=val" c3me="L295"> 295}
        strucef="rreleas"li3e" name="L26rucef="rreleas" 348;02x%02x%02x%02x%02xr="line" 3ame="L296"> 296
dev,
attr,
        struchref="+code=kstru16" clvoid7/a>        strucibuss="sref"_gropvicehref="+code=sniff_max_interval" class=4ount" cla4s="sref">count)
 300{
 301        struct hci_dehref="+code=kstru16" e="L339"> 339   privaa3s="li36ef">hdevprivaa316" ooth/hci_sysfs.c#L279" id="L279" cla3s4e=dev" cl4ss="sref">dev);
 325iscovery_toot"li363 name="L332iscovery_toot" 301        struccacheli363 name="L33cachev" clasi_sy3fs.c#L272" id=" id="L339" class="line" name="L339"> 339   2iscoveryli363 name="L332iscovery16" ooth/hci_sysfs.c#L279" id="L279" cla3s4e3dev" cl4se="L292"> 292{
        struceli363 name="L33316" ooth/hci_sysfs.c#L279" id="L279" cla3s4e4dev" cl4ss="sref">dev);
 304
_lockss="line" name="L301">_lockam0uetooth/hci_sysfs. to_hci_dev(val);
rv < 0)
kstrtou16 339   al332"ref">bufal3+code=show_sniff_min_al332"ref">bufal3+cod)/a>bt_hostagroup=device_attribubt_hosta4code=rv" 4lass="sref">rv;
(struatali363 name="L33data_min_asi_sy3fs.c#L272" id="eli363 name="L33316" e="L339"> 339   2atali363 name="L33data_minass="sref">to_hci_dev(attr,
sprintf(to_hci_dev(sni4f_min_interval)
 339   bda>, evass=" ref="+cbda>, +cod)sss="sref">to_hci_dev(EINVAL;
 339   pscanrrep_m>  s="li36ef">hdevpscanrrep_m>  +code=show_sniff_min_Latali363 name="L33data_mine="L339"> 339   pscanrperiod_m>  s="li36ef">hdevpscanrperiod_m>   348;02x%02x%02x%02x%02xs="line" 4ame="L311"> 311
 339   pscanrm>  s="li36ef">hdevpscanrm>  +code=show_sniff_min_Latali363 name="L33data_mine="L339"> 339   1">_363 n32"ref">buf, 0,"ref"uteval;
 339   1">_363 n32"ref">buf, 0,"ref"ute 339   1">_363 n32"ref">buf, 0,"ref"ute 313
buf__le16_to_cpusref">hdev =  339   clock_offseclass="line" namelock_offsec+cod)sss="sref">to_hci_dev(count;
hdev =  339   rssili3e" name="L26rssi+code=show_sniff_min_Latali363 name="L33data_mine="L339"> 339   ssp_m>  s="li36ef">hdevssp_m>  +code=show_sniff_min_eli363 name="L33316" e="L339"> 339   devatoomibuss="sref"_grodevatoomiv" class="sref">to_hci_dev( 315}
 316
dev,
_unlockss="line" name="L301">_unlockam0uetooth/hci_sysfs. to_hci_dev(buf)
 319{
to_hci_dev(dev);
snif4_min_interval);
 322}
bufal3+codce" class4"sref">device *dev);
   ssp_m>  s=" hame="L33data_mine=nnameL2sn_sysfs.c#L285" id="L2_href="+code=kstru16" e2_href="+0uetooth/hci_sysfs. devi4e_attribute *dev);
size_t  316
 340
to_hci_dev( 295}
etooth/hi_sysfs.c#Letoonternt;
u16  295}
;
 295}
llsee/bluetooth/hci_sllsee/nternt;
<        struct  295}
buf, 0, & 296
 333<4a>        if (dev);
 322}
        struchref="+code=kstru16" clvoid7/a>        strucibuss="sref"_gropviluetooth/4ci_sysfs.c#L335" id="L334" cla4s="lingroup=deviceli3e" name="L26rucef="ibut4a href="+4ode=sniff_max_interval" 4lass=4sref">sniff_maL300"> 300{
 301        struct hci_dehref="+code=kstru16" e="L339"> 339   privaa3s="li36ef">hdevprivaa316         4     return -count;
hdevprivaa316 lass="sr4ci_sysfs.c#L338" id="L334" cla43e=buf" c4ass="sref">buf)
sniff4min_interval =  289
_lockss="line" name="L301">_lockam0uetooth/hci_sysfs. rv;
 341 331
 33am0uetooth/hci_sysfselname="L33cachev" clasi_sy3fs.c#L272" id=" id="Lblacki_syth/hi_sysfs.c#Lblacki_syche_/a>   ssp_m>  s="i_syth/hi_sysfs.c#Li_syche_oid7/a>        strucibuss="sref"_gropviuetooth/h4i_sysfs.c#L342" id="L3424 clas443dev" cl4ass="sref">vtr,
sprintfooth/hci_sysfs./hci_sysfs.iff_min_intervabatf="devass=bme="L33data_mine> 33s.c#L273" id="Latali363 name="L33data_mine="L339"> 3ooth/hci_sysfs.  333<4ci_sysfs.c#L343" id="L344" cla444dev" cl4ss="sref">dev);
show_bus,  304
_unlockss="line" name="L301">_unlockam0uetooth/hci_sysfs. val);
show_name, 319{
, count;
s4ow_address, buf)
sh4w_featuresress, 4a hre4="+code=NULL""L322"> 322}
rv;
        strucibuss="sref"_gropviref="+cod4=S_IRUGO" class="sref">S4IRUGO4/a>, buf"sref4     452"line" name="L286">ev);
   ssp_m>  s=" hame="L33data_mine=nnameL2sn_sysfs.c#L285" id="L2_href="+code=kstru16" e2_href="+0uetooth/hci_sysfs. hde4-4gt;count;
dev);
 340
 295}
etooth/hi_sysfs.c#Letoonternt;
4% 2 |ne"WUS"+code=DE4ICE_A4ne"WUS"class="L295"> 295}
;
45oup nameNAe="L327"> 327{
llsee/bluetooth/hci_sllsee/nternt;
<        struct 4% 2 |ne"WUS"+code=DE4ICE_A45=dev" class="L295"> 295}
4tore_se" 3ame="L296"> 296
rv;
val;
        strucibuss="sref"_gropvi" hre nam4a>        strucef="=devi4e_att4ibuss=group=deviceli3e" name="L26rucef="ibut4 href nam4a>        strucef="=devi4e_att46buss="class="sref">attr,__beci_sysfs.c# id=fs.cbeci> 325  3s="li363i+co0_sysfs.c# id=fsi+co0"L339"> 339   rssili34_sysfs.c# id=fsi+co4> 339   privaa3s="li36ef">hdevprivaa316 href nam4a>        strucef="=devi4e_att46="line" 4ame="L304"> 304.cbe32" class="line" .cbe32> 325  3s="li363i+co1_sysfs.c# id=fsi+co1"L339"> 339   rssili3i_sysfs.c# id=fsili3i"L339"> 339   rssili33_sysfs.c# id=fsili33"L339"> 339   rssili35_sysfs.c# id=fsili35> 339   privaa3s="li36ef">hdevprivaa316 href="+c4a>        strucef="=devi4e_att46=val" cl4ss="sref">val);
        strucef="=devi4e_att46 class="4ref">rv < 0)memcptooth/hctooth/hcmemcpt_min_intervabatf="devass=i+co0_sysfs.c# id=fsi+co0"L339"intervabatf="devass=uuid="n396bluetoothuuidche_>    4ooth/hci_sysfs. dev,memcptooth/hctooth/hcmemcpt_min_intervabatf="devass=i+co1_sysfs.c# id=fsi+co1"L339"intervabatf="devass=uuid="n396bluetoothuuidche_>4   2ooth/hci_sysfs. 4a>        strucef="=devi4e_att46"line" n3me="L288"> 288}memcptooth/hctooth/hcmemcpt_min_intervabatf="devass=i+coi_sysfs.c# id=fsili3i"L339"intervabatf="devass=uuid="n396bluetoothuuidche_>6   2ooth/hci_sysfs.         strucef="=devi4e_att47="line" 3ame="L289"> 289
emcptooth/hctooth/hcmemcpt_min_intervabatf="devass=i+co3_sysfs.c# id=fsili33"L339"intervabatf="devass=uuid="n396bluetoothuuidche_>8   2ooth/hci_sysfs.  289
emcptooth/hctooth/hcmemcpt_min_intervabatf="devass=i+co4_sysfs.c# id=fsi+co4> 339"intervabatf="devass=uuid="n396bluetoothuuidche_>1    4ooth/hci_sysfs.         strucef="=devi4e_att47="line" name="L331"> 331
emcptooth/hctooth/hcmemcpt_min_intervabatf="devass=i+co5_sysfs.c# id=fsili35> 339"intervabatf="devass=uuid="n396bluetoothuuidche_>14   2ooth/hci_sysfs.         strucef="=devi4e_att47t;buf"buf" cla4ore_s nam4a>        strucef="=devi4e_att4ibuss="class="sref">attr,="n40/bluetooth/hci_sysfs.iff_min_intervaseq_1" class="line" name="eq_1" claam0uetooth/hci_sysfshref="+code=ks.8x-="sdass=-="sdass=-="sdass=-="sdas8s="sdass=xss="s.2xa0xss="s.4xass="sdass="sdass="su"+code=buf" cname="L274"de=hdev" class="sref">h4evattr,
bufantoh3ntervaseq_1" class="i+co0_sysfs.c# id=fsi+co0"L33)9"> 339   rssntohttribute< L278".ntohtntervaseq_1" class="i+co1_sysfs.c# id=fsi+co1"L33)9"> 339   rssntohttribute< L278".ntohtntervaseq_1" class="i+coi_sysfs.c# id=fsili3i"L33)9"> 339   rssntohttribute< L278".ntohtntervaseq_1" class="i+co3_sysfs.c# id=fsili33"L33ock_offseclass="line" namelock_offsec+coetooth/hc4_sy3fs.c#L275" id="L275"4cla3s47attr" class="sref">attr,
bufantoh3ntervaseq_1" class="i+co4_sysfs.c# id=fsi+co4> 33)9"> 339   rssntohttribute< L278".ntohtntervaseq_1" class="i+co5_sysfs.c# id=fsili35> 333ooth/hci_sysfs. count;
dev,
attr,
        struchref="+code=kstru16" clvoid7/a>        strucibuss="sref"_gropvietooth/hc4_sysfs.c#L279" id="L279"4cla3s48unt" cla4s="sref">count)
 300{
 301        struct hci_dehref="+code=kstru16" e="L339"> 339   privaa3s="li36ef">hdevprivaa316bt_hostag4oupdev);
hdevprivaa316bre_s nam4hostass="buf"buf" cla4name="L274"de=hdev" class="sref">h4evattr,
_lockss="line" name="L301">_lockam0uetooth/hci_sysfs.  284
attr,
 339   rssi_syth/hi_sysfs.c#Li_syche_oid7/a>        strucibuss="sref"_gropvicehref="+4ode=sniff_max_interval" 4lass=48e"WUS"class="sref">atf">val;
bt_ho4i_sysfs.c#L327" id="L3274 clas48e=dev" c3ass="sref">dev,
to_hci_dev( 288}
_unlockss="line" name="L301">_unlockam0uetooth/hci_sysfs. to_hci_dev(buf"buf" cla4class="sr4f">to_hci_dev(319{
count;
buf"buf" cla4bt_ho4tagroup=device_attribubt4hosta49="li35" name"sref">attr,
rv;
        strucibuss="sref"_gropvi37;02x"02x%02x%02x鈚xref">scla4s="sref">count)
ev);
   ssp_m>  s=" hame="L33data_mine=nnameL2sn_sysfs.c#L285" id="L2_href="+code=kstru16" e2_href="+0uetooth/hci_sysfs. count;
dev,
 340
  cla4s="sref">count)
 295}
etooth/hi_sysfs.c#Letoonternt;
 295}
;
 295}
llsee/bluetooth/hci_sllsee/nternt;
<        struct  295}
EINVAL;
 284
to_hci_dev(attr,
        struchreili3e" name="L26rssi+code=s/a>   ssp_m>  s="u64_sysfs.c# id=fsu6buss=">   ssp_m>  s="y3fs.c#L273" id="Lef">showa hrame="L284"> 284
 286
count;
 328        struct  339   2atali363 name="L33data_5inass="sr5f">to_hci_dev(buf)
to_hci_dev( 289
_lockss="line" name="L301">_lockam0uetooth/hci_sysfs. to_hci_dev(rv;
 331name="L33cachev" clasi_sy3fs.c#L272" id=" id="Lauto_accepts.clay3data_mine="L33auto_accepts.clay8        struct shooth/hci_sysfs. buf"buf" cla50];02x#02x%02x%02x鉾x3buss="class="sref">attr,
_unlockss="line" name="L301">_unlockam0uetooth/hci_sysfs. to_hci_dev( 284
to_hci_dev(319{
count;
dev,
to_hci_dev(attr,
        struchreili3e" name="L26rssi+code=s/a>   ssp_m>  s="u64_sysfs.c# id=fsu6buss="        struchrey3fs.c#L273" id="Lef">showa hrame="L284"> 284
count)
to_hci_dev( 300{
 301        struct  339   2atali363 name="L33data_5uetooth/h5i_sysfs.c#L261" id="L2615 clas5ref">snif4_min_interval);
va3 > 3600000))
_lockss="line" name="L301">_lockam0uetooth/hci_sysfs. dev);
device *sho>        struct  *val);
size_t rv < 0)
_unlockss="line" name="L301">_unlockam0uetooth/hci_sysfs. dev,
to_hci_dev(319{
u16 count;
 330        int rv;
 32_unlockss="lineDEFINE_SIMPLsfs.c#IBUTEme="L301">_unloDEFINE_SIMPLsfs.c#IBUTE301">_unlockss="lineauto_accepts.clay_foattribute< L278".auto_accepts.clay_foatde=s/a>   ssp_m>  s="auto_accepts.clay_gL33data_mine="L33auto_accepts.clay_gL3nterck_offseclass="line" namelock_offsec+c5duetooth/5>buf, 0, &val;
f">attr,
 333<5a>        if (dev);
val;
 301 284
sniff_maL300"> 300{
store_sniff_min_       struccacheli363 name="L33cachev" clasi_sy3fs.c#L272" id=" id="L3="sref">store_sniff_min_oth/hci_sysfs. dev,
 288}3="sref">store_sniff_min_code=show_sniff_min_ebluetooth/h"line" 325"> 325      struccacheli363  name="L332"ra>  3s="strucef="+cooth/hci_sysfs. sniff5min_interval =  2893="sref">store_sniff_min_code=show_sniff_min_ef">ssref">store_snief">s>sho>        struct ssref">store_snitruef">s"+cooth/hci_sysfs. rv;
 341 331__ci_sysfgL33data_mine="L33__ci_sysfgL3301">_unlockss="lineL271"ref">bmodu&naam0uetooth/hci_sysfsTHIS_MODULEme="L271"ref">bTHIS_MODULEv"5uetooth/h5i_sysfs.c#L342" id="L3425 clas54sref">va3 > 3600000))name="Linitializ"rreleas" 348_unlockss="line="+code=hdev" class="sref">hdev =  333<5ci_sysfs.c#L343" id="L345" cla544dev"class="sref">count;
show_bus,  284
show_type, attr,
 301 284
show_name,  286
, count;
store_sniff_min_       struccacheli363 name="L33cachev" clasi_sy3fs.c#L272" id=" id="L3="sref">store_sniff_min_oth/hci_sysfs. s5ow_address, attr,
sh5w_featuresress, 5a hre55li3e" nam}"+code=features" f">buf"buf" cla5ref="+cod5=S_IRUGO" class="sref">S5IRUGO55buss="class=""L289"> 289BT_DBGme="L33data_minBT_DBG301">_uetooth/hci_sysfshref="+code=ksp"sref de=kstrbutru16" cintf" class="sref">sprintfname="L33cachev" clasi_sy3fsref">sprintfname="L33cachev" clasi_sy3fs.c#L272" id=" id="Lsref="L33cachev" clsrefsy3fsref">sprintfname="L33cachev" clasi_sy3fs.c#L272" id=" id="Lbutsref">store_snitussref">hdev = buf"sref5     55ef">snif4_min_interval);
hde5-55sref">va3 > 3600000))nam_"L3_sref="L33cachev" clnam_"L3_sref301">_unlockss="line="+code=hdev" class="srefam0uetooth/hci_sysfshref="+code=kstintf" class="sref">sprintfname="L33cachev" clasi_sy3fs.c#L272" id=" id="Lsref="L33cachev" clsrefsy3f">hdev =  333<5ci_sysfs.c#L253" id="L255" cla554dev" cl4ss="sref">dev);
 304erame="L33data_mineramin_>        struct _unlockss="line="+code=hdev" class="sref">hdev =  284
at"L286">ev);
55e=dev" c3ass="sref">dev,
 284
56ref">sni4f_min_interv"L286">319{
rv;
 331name="L33cachev" clasi_sy3fs.c#L272" id=" id="Ldebug="bluetooth/hci_sdebug="1        struct _unlockss="line" name="L301">_unlockam0uets.c#L272" id=" id="Lsref="L33cachev" clsrefsy3fsref">sprintftrudebug="bluetooth/hci_strudebug="1{
        strucef="=devi5e_att563dev" class="if t!      struct  284
 333<5a>        strucef="=devi5e_att56buss="class="n_interv"L286">319{
 284
        strucef="=devi5e_att566uss="class="sref">attr,eebug="_create_lache_ 349 348_uetooth/hci_sysfshref="+co330" id=inquiintf" class="sr0444sref">sprintfname="L33cachev" clasi_sy3fs.c#L272" id=" id="Ldebug="bluetooth/hci_sdebug="1atttttttttttttef">sprintfname="L33cachev" clasi_sy3fsr    struccacheli363 330" id=inquirfoattribute< L278".330" id=inquirfoat"+cow19{
        strucef="=devi5e_att56e=dev" c3ass="sref">dev,
 288}eebug="_create_lache_ 349 348_uetooth/hci_sysfshref="+coblacki_syintf" class="sr0444sref">sprintfname="L33cachev" clasi_sy3fs.c#L272" id=" id="Ldebug="bluetooth/hci_sdebug="1        strucef="=devi5e_att57ref">sni4f_min_interval)
sprintfname="L33cachev" clasi_sy3fsr    struccacheli363 blacki_sysfoattribute< L278".blacki_sysfoat"+cow19{
        strucef="=devi5e_att57ode=rv" class="sref">rv;
 331eebug="_create_lache_ 349 348_uetooth/hci_sysfshref="+couuidsintf" class="sr0444sref">sprintfname="L33cachev" clasi_sy3fs.c#L272" id=" id="Ldebug="bluetooth/hci_sdebug="1sprintfname="L33cachev" clasi_sy3fsr    struccacheli363 uuidssfoattribute< L278".uuidssfoat1{
        strucef="=devi5e_att57t;buf"buf" cla5ore_s nam5a>        strucef="=devi5e_att5ibuss="class="sref">attr,eebug="_create_lache_ 349 348_uetooth/hci_sysfshref="+coauto_accepts.clayintf" class="sr0444sref">sprintfname="L33cachev" clasi_sy3fs.c#L272" id=" id="Ldebug="bluetooth/hci_sdebug="1sprintfname="L33cachev" clasi_sy3fshref="+code=features" f">buf"buf" cla5o val5"de=hdev" class="sref">h5evattr<<<<<<<<<<    struccacheli363 auto_accepts.clay_foattribute< L278".auto_accepts.clay_foatde=sw19{
319{
count;
dev,
val;
 301 284
count)
 289BT_DBGme="L33data_minBT_DBG301">_uetooth/hci_sysfshref="+code=ksp"sref de=kstrbutru16" cintf" class="sref">sprintfname="L33cachev" clasi_sy3fsref">sprintfname="L33cachev" clasi_sy3fs.c#L272" id=" id="Lsref="L33cachev" clsrefsy3fsref">sprintfname="L33cachev" clasi_sy3fs.c#L272" id=" id="Lbutsref">store_snitussref">hdev = snif4_min_interval);
va3 > 3600000))nabug="_removlu_unlockss="line" name="L301">_unlockam0uets.c#L272" id=" id="Ldebug="bluetooth/hci_sdebug="1hdev = h5evdev);
 304re_sniL.clrreleas" 348    struccacheli363 name="L33cachev" clasi_sy3fs.c#L272" id=" id="L3="sref">store_sniff_min_w>hdev = dev);
 316
attr,
sprintftru4ef="Linit3data_mine="L33tru4ef="Linit301">="srwa hrame="L284"> 284
to_hci_dev(count)
to_hci_dev( 289trudebug="bluetooth/hci_strudebug="1        struct _uetooth/hci_sysfshref="+coblt)
intf" class="sref">sprintfNULLme="L33data_minNULLmin_w>hdev = to_hci_dev(rv;
 331truef">ssref">store_snitruef">s"+co>        struct s_createsref">store_snief">s_create301">_unlockss="lineL271"ref">bmodu&naam0uetooth/hci_sysfsam0uetooth/hci_sysfshref="+coblt)
intf" class="w>hdev = _unlockss="linetruef">ssref">store_snitruef">s"+co)wa hrame="L284"> 284
_unlockss="linePTRhERRmodu&naam0uePTRhERR301">_unlockss="linetruef">ssref">store_snitruef">s"+co)>hdev =  284
319{
count;
dev,
val;
="srwa hrame="L284"> 284
count)
 289ef">s_desysoy3data_mine="L33ef">s_desysoy301">_unlockss="linetruef">ssref">store_snitruef">s"+co)>hdev = snif4_min_interval);
va3 > 3600000))nabug="_removlu_unlockss="linetrudebug="bluetooth/hci_strudebug="1{
count;



;er"> The original LXR software by the ass="srefhttp://sourceforge.">coprojects/lxr">LXR communityysfsamthis experimental version by ass="srefmailto:lxr@L30ux.no">lxr@L30ux.noysfs.
;er"> lxr.L30ux.no kindly cef=ed by ass="srefhttp://www.redpill-L30pro.no">Redpill L30pro ASysfsamprovider of L30ux=="L3ultfsh and etorff="L3 ser_sni3 since 1995.