1883{
1884 struct irlmp_iter_state *iter = seq->private;
1885 void *v;
1886 loff_t off = *pos;
1887
1888 iter->hashbin = NULL;
1889 if (off-- == 0)
1890 return LSAP_START_TOKEN;
1891
1892 iter->hashbin = irlmp->unconnected_lsaps;
1893 v = irlmp_seq_hb_idx(iter, &off);
1894 if (v)
1895 return v;
1896
1897 if (off-- == 0)
1898 return LINK_START_TOKEN;
1899
1900 iter->hashbin = irlmp->links;
1901 return irlmp_seq_hb_idx(iter, &off);
1902}
1903
1904static void *irlmp_seq_next(struct seq_file *seq, void *v, loff_t *pos)
1905{
1906 struct irlmp_iter_state *iter = seq->private;
1907
1908 ++*pos;
1909
1910 if (v == LSAP_START_TOKEN) {
1911 iter->hashbin = irlmp->unconnected_lsaps;
1912 v = irlmp_seq_hb_idx(iter, NULL);
1913 return v ? v : LINK_START_TOKEN;
1914 }
1915
1916 if (v == LINK_START_TOKEN) {
1917 iter->hashbin = irlmp->links;
1918 return irlmp_seq_hb_idx(iter, NULL);
1919 }
1920
1921 v = hashbin_get_next(iter->hashbin);
1922
1923 if (v == NULL) {