1843 break;
1844 default:
1845 IRDA_DEBUG(1, "%s(), Unknow IrLAP disconnect reason %d!\n",
1846 __func__, lap_reason);
1847 reason = LM_LAP_DISCONNECT;
1848 break;
1849 }
1850
1851 return reason;
1852}
1853
1854#ifdef CONFIG_PROC_FS
1855
1856struct irlmp_iter_state {
1857 hashbin_t *hashbin;
1858};
1859
1860#define LSAP_START_TOKEN ((void *)1)
1861#define LINK_START_TOKEN ((void *)2)
1862
1863static void *irlmp_seq_hb_idx(struct irlmp_iter_state *iter, loff_t *off)
1864{
1865 void *element;
1866
1867 spin_lock_irq(&iter->hashbin->hb_spinlock);
1868 for (element = hashbin_get_first(iter->hashbin);
1869 element != NULL;
1870 element = hashbin_get_next(iter->hashbin)) {
1871 if (!off || *off-- == 0) {
1872
1873 return element;
1874 }
1875 }
1876 spin_unlock_irq(&iter->hashbin->hb_spinlock);
1877 iter->hashbin = NULL;
1878 return NULL;
1879}
1880
1881
1882static void *irlmp_seq_start(struct seq_file *seq, loff_t *pos)
1883{