409-wext_compat.patch 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. --- a/net80211/ieee80211_wireless.c
  2. +++ b/net80211/ieee80211_wireless.c
  3. @@ -73,6 +73,13 @@
  4. (_vap)->iv_ic->ic_roaming == IEEE80211_ROAMING_AUTO)
  5. #define RESCAN 1
  6. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
  7. +#define IWE(func, ...) func(&iweinfo, __VA_ARGS__)
  8. +static struct iw_request_info iweinfo = { 0, 0 };
  9. +#else
  10. +#define IWE(func, ...) func(__VA_ARGS__)
  11. +#endif
  12. +
  13. static void
  14. pre_announced_chanswitch(struct net_device *dev, u_int32_t channel, u_int32_t tbtt);
  15. @@ -1800,7 +1807,7 @@ giwscan_cb(void *arg, const struct ieee8
  16. IEEE80211_ADDR_COPY(iwe.u.ap_addr.sa_data, se->se_macaddr);
  17. else
  18. IEEE80211_ADDR_COPY(iwe.u.ap_addr.sa_data, se->se_bssid);
  19. - current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_ADDR_LEN);
  20. + current_ev = IWE(iwe_stream_add_event, current_ev, end_buf, &iwe, IW_EV_ADDR_LEN);
  21. /* We ran out of space in the buffer. */
  22. if (last_ev == current_ev)
  23. @@ -1811,7 +1818,7 @@ giwscan_cb(void *arg, const struct ieee8
  24. iwe.cmd = SIOCGIWESSID;
  25. iwe.u.data.flags = 1;
  26. iwe.u.data.length = se->se_ssid[1];
  27. - current_ev = iwe_stream_add_point(current_ev,
  28. + current_ev = IWE(iwe_stream_add_point, current_ev,
  29. end_buf, &iwe, (char *) se->se_ssid+2);
  30. /* We ran out of space in the buffer. */
  31. @@ -1824,7 +1831,7 @@ giwscan_cb(void *arg, const struct ieee8
  32. iwe.cmd = SIOCGIWMODE;
  33. iwe.u.mode = se->se_capinfo & IEEE80211_CAPINFO_ESS ?
  34. IW_MODE_MASTER : IW_MODE_ADHOC;
  35. - current_ev = iwe_stream_add_event(current_ev,
  36. + current_ev = IWE(iwe_stream_add_event, current_ev,
  37. end_buf, &iwe, IW_EV_UINT_LEN);
  38. /* We ran out of space in the buffer. */
  39. @@ -1837,7 +1844,7 @@ giwscan_cb(void *arg, const struct ieee8
  40. iwe.cmd = SIOCGIWFREQ;
  41. iwe.u.freq.m = se->se_chan->ic_freq * 100000;
  42. iwe.u.freq.e = 1;
  43. - current_ev = iwe_stream_add_event(current_ev,
  44. + current_ev = IWE(iwe_stream_add_event, current_ev,
  45. end_buf, &iwe, IW_EV_FREQ_LEN);
  46. /* We ran out of space in the buffer. */
  47. @@ -1848,7 +1855,7 @@ giwscan_cb(void *arg, const struct ieee8
  48. last_ev = current_ev;
  49. iwe.cmd = IWEVQUAL;
  50. set_quality(&iwe.u.qual, se->se_rssi, ATH_DEFAULT_NOISE);
  51. - current_ev = iwe_stream_add_event(current_ev,
  52. + current_ev = IWE(iwe_stream_add_event, current_ev,
  53. end_buf, &iwe, IW_EV_QUAL_LEN);
  54. /* We ran out of space in the buffer */
  55. @@ -1863,7 +1870,7 @@ giwscan_cb(void *arg, const struct ieee8
  56. else
  57. iwe.u.data.flags = IW_ENCODE_DISABLED;
  58. iwe.u.data.length = 0;
  59. - current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, "");
  60. + current_ev = IWE(iwe_stream_add_point, current_ev, end_buf, &iwe, "");
  61. /* We ran out of space in the buffer. */
  62. if (last_ev == current_ev)
  63. @@ -1878,7 +1885,7 @@ giwscan_cb(void *arg, const struct ieee8
  64. int r = se->se_rates[2 + j] & IEEE80211_RATE_VAL;
  65. if (r != 0) {
  66. iwe.u.bitrate.value = r * (1000000 / 2);
  67. - current_val = iwe_stream_add_value(current_ev,
  68. + current_val = IWE(iwe_stream_add_value, current_ev,
  69. current_val, end_buf, &iwe,
  70. IW_EV_PARAM_LEN);
  71. }
  72. @@ -1887,7 +1894,7 @@ giwscan_cb(void *arg, const struct ieee8
  73. int r = se->se_xrates[2+j] & IEEE80211_RATE_VAL;
  74. if (r != 0) {
  75. iwe.u.bitrate.value = r * (1000000 / 2);
  76. - current_val = iwe_stream_add_value(current_ev,
  77. + current_val = IWE(iwe_stream_add_value, current_ev,
  78. current_val, end_buf, &iwe,
  79. IW_EV_PARAM_LEN);
  80. }
  81. @@ -1906,7 +1913,7 @@ giwscan_cb(void *arg, const struct ieee8
  82. iwe.cmd = IWEVCUSTOM;
  83. snprintf(buf, sizeof(buf), "bcn_int=%d", se->se_intval);
  84. iwe.u.data.length = strlen(buf);
  85. - current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, buf);
  86. + current_ev = IWE(iwe_stream_add_point, current_ev, end_buf, &iwe, buf);
  87. /* We ran out of space in the buffer. */
  88. if (last_ev == current_ev)
  89. @@ -1930,7 +1937,7 @@ giwscan_cb(void *arg, const struct ieee8
  90. rsn_leader, sizeof(rsn_leader) - 1);
  91. #endif
  92. if (iwe.u.data.length != 0) {
  93. - current_ev = iwe_stream_add_point(current_ev, end_buf,
  94. + current_ev = IWE(iwe_stream_add_point, current_ev, end_buf,
  95. &iwe, buf);
  96. /* We ran out of space in the buffer */
  97. @@ -1956,7 +1963,7 @@ giwscan_cb(void *arg, const struct ieee8
  98. wpa_leader, sizeof(wpa_leader) - 1);
  99. #endif
  100. if (iwe.u.data.length != 0) {
  101. - current_ev = iwe_stream_add_point(current_ev, end_buf,
  102. + current_ev = IWE(iwe_stream_add_point, current_ev, end_buf,
  103. &iwe, buf);
  104. /* We ran out of space in the buffer. */
  105. @@ -1975,7 +1982,7 @@ giwscan_cb(void *arg, const struct ieee8
  106. se->se_wme_ie, se->se_wme_ie[1] + 2,
  107. wme_leader, sizeof(wme_leader) - 1);
  108. if (iwe.u.data.length != 0) {
  109. - current_ev = iwe_stream_add_point(current_ev, end_buf,
  110. + current_ev = IWE(iwe_stream_add_point, current_ev, end_buf,
  111. &iwe, buf);
  112. /* We ran out of space in the buffer. */
  113. @@ -1993,7 +2000,7 @@ giwscan_cb(void *arg, const struct ieee8
  114. se->se_ath_ie, se->se_ath_ie[1] + 2,
  115. ath_leader, sizeof(ath_leader) - 1);
  116. if (iwe.u.data.length != 0) {
  117. - current_ev = iwe_stream_add_point(current_ev, end_buf,
  118. + current_ev = IWE(iwe_stream_add_point, current_ev, end_buf,
  119. &iwe, buf);
  120. /* We ran out of space in the buffer. */