Changeset 3750
- Timestamp:
- 07/05/08 04:21:38 (4 years ago)
- Files:
-
- madwifi/trunk/net80211/ieee80211_wireless.c (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
madwifi/trunk/net80211/ieee80211_wireless.c
r3733 r3750 1771 1771 struct iwscanreq { /* XXX: right place for this declaration? */ 1772 1772 struct ieee80211vap *vap; 1773 struct iw_request_info *info; 1773 1774 char *current_ev; 1774 1775 char *end_buf; … … 1776 1777 }; 1777 1778 1779 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) 1780 #define iwe_stream_add_event(a, b, c, d, e) iwe_stream_add_event(b, c, d, e) 1781 #define iwe_stream_add_point(a, b, c, d, e) iwe_stream_add_point(b, c, d, e) 1782 #define iwe_stream_add_value(a, b, c, d, e, f) \ 1783 iwe_stream_add_value(b, c, d, e, f) 1784 #endif 1778 1785 static int 1779 1786 giwscan_cb(void *arg, const struct ieee80211_scan_entry *se) … … 1808 1815 else 1809 1816 IEEE80211_ADDR_COPY(iwe.u.ap_addr.sa_data, se->se_bssid); 1810 current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_ADDR_LEN); 1817 current_ev = iwe_stream_add_event(req->info, current_ev, end_buf, 1818 &iwe, IW_EV_ADDR_LEN); 1811 1819 1812 1820 /* We ran out of space in the buffer. */ … … 1819 1827 iwe.u.data.flags = 1; 1820 1828 iwe.u.data.length = se->se_ssid[1]; 1821 current_ev = iwe_stream_add_point( current_ev,1822 end_buf, &iwe, (char *)se->se_ssid + 2);1829 current_ev = iwe_stream_add_point(req->info, current_ev, 1830 end_buf, &iwe, (char *)se->se_ssid + 2); 1823 1831 1824 1832 /* We ran out of space in the buffer. */ … … 1832 1840 iwe.u.mode = se->se_capinfo & IEEE80211_CAPINFO_ESS ? 1833 1841 IW_MODE_MASTER : IW_MODE_ADHOC; 1834 current_ev = iwe_stream_add_event( current_ev,1835 end_buf, &iwe, IW_EV_UINT_LEN);1842 current_ev = iwe_stream_add_event(req->info, current_ev, 1843 end_buf, &iwe, IW_EV_UINT_LEN); 1836 1844 1837 1845 /* We ran out of space in the buffer. */ … … 1845 1853 iwe.u.freq.m = se->se_chan->ic_freq * 100000; 1846 1854 iwe.u.freq.e = 1; 1847 current_ev = iwe_stream_add_event( current_ev,1848 end_buf, &iwe, IW_EV_FREQ_LEN);1855 current_ev = iwe_stream_add_event(req->info, current_ev, 1856 end_buf, &iwe, IW_EV_FREQ_LEN); 1849 1857 1850 1858 /* We ran out of space in the buffer. */ … … 1856 1864 iwe.cmd = IWEVQUAL; 1857 1865 set_quality(&iwe.u.qual, se->se_rssi, ATH_DEFAULT_NOISE); 1858 current_ev = iwe_stream_add_event( current_ev,1859 end_buf, &iwe, IW_EV_QUAL_LEN);1866 current_ev = iwe_stream_add_event(req->info, current_ev, 1867 end_buf, &iwe, IW_EV_QUAL_LEN); 1860 1868 1861 1869 /* We ran out of space in the buffer */ … … 1871 1879 iwe.u.data.flags = IW_ENCODE_DISABLED; 1872 1880 iwe.u.data.length = 0; 1873 current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, ""); 1881 current_ev = iwe_stream_add_point(req->info, current_ev, 1882 end_buf, &iwe, ""); 1874 1883 1875 1884 /* We ran out of space in the buffer. */ … … 1886 1895 if (r != 0) { 1887 1896 iwe.u.bitrate.value = r * (1000000 / 2); 1888 current_val = iwe_stream_add_value( current_ev,1889 current_val, end_buf, &iwe,1890 IW_EV_PARAM_LEN);1897 current_val = iwe_stream_add_value(req->info, 1898 current_ev, current_val, end_buf, 1899 &iwe, IW_EV_PARAM_LEN); 1891 1900 } 1892 1901 } … … 1895 1904 if (r != 0) { 1896 1905 iwe.u.bitrate.value = r * (1000000 / 2); 1897 current_val = iwe_stream_add_value( current_ev,1898 current_val, end_buf, &iwe,1899 IW_EV_PARAM_LEN);1906 current_val = iwe_stream_add_value(req->info, 1907 current_ev, current_val, end_buf, 1908 &iwe, IW_EV_PARAM_LEN); 1900 1909 } 1901 1910 } … … 1914 1923 snprintf(buf, sizeof(buf), "bcn_int=%d", se->se_intval); 1915 1924 iwe.u.data.length = strlen(buf); 1916 current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, buf); 1925 current_ev = iwe_stream_add_point(req->info, current_ev, 1926 end_buf, &iwe, buf); 1917 1927 1918 1928 /* We ran out of space in the buffer. */ … … 1938 1948 #endif 1939 1949 if (iwe.u.data.length != 0) { 1940 current_ev = iwe_stream_add_point( current_ev, end_buf,1941 &iwe, buf);1950 current_ev = iwe_stream_add_point(req->info, 1951 current_ev, end_buf, &iwe, buf); 1942 1952 1943 1953 /* We ran out of space in the buffer */ … … 1964 1974 #endif 1965 1975 if (iwe.u.data.length != 0) { 1966 current_ev = iwe_stream_add_point( current_ev, end_buf,1967 &iwe, buf);1976 current_ev = iwe_stream_add_point(req->info, 1977 current_ev, end_buf, &iwe, buf); 1968 1978 1969 1979 /* We ran out of space in the buffer. */ … … 1983 1993 wme_leader, sizeof(wme_leader) - 1); 1984 1994 if (iwe.u.data.length != 0) { 1985 current_ev = iwe_stream_add_point( current_ev, end_buf,1986 &iwe, buf);1995 current_ev = iwe_stream_add_point(req->info, 1996 current_ev, end_buf, &iwe, buf); 1987 1997 1988 1998 /* We ran out of space in the buffer. */ … … 2001 2011 ath_leader, sizeof(ath_leader) - 1); 2002 2012 if (iwe.u.data.length != 0) { 2003 current_ev = iwe_stream_add_point( current_ev, end_buf,2004 &iwe, buf);2013 current_ev = iwe_stream_add_point(req->info, 2014 current_ev, end_buf, &iwe, buf); 2005 2015 2006 2016 /* We ran out of space in the buffer. */ … … 2024 2034 2025 2035 req.vap = vap; 2036 req.info = info; 2026 2037 req.current_ev = extra; 2027 2038 if (data->length == 0) {
