300-api_sync.patch 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. --- a/main.c
  2. +++ b/main.c
  3. @@ -497,7 +497,7 @@ int acx_free_mechanics(acx_device_t *ade
  4. int acx_init_ieee80211(acx_device_t *adev, struct ieee80211_hw *hw)
  5. {
  6. - hw->flags &= ~IEEE80211_HW_RX_INCLUDES_FCS;
  7. + __clear_bit(IEEE80211_HW_RX_INCLUDES_FCS, hw->flags);
  8. hw->queues = 1;
  9. hw->wiphy->max_scan_ssids = 1;
  10. @@ -525,14 +525,14 @@ int acx_init_ieee80211(acx_device_t *ade
  11. /* We base signal quality on winlevel approach of previous driver
  12. * TODO OW 20100615 This should into a common init code
  13. */
  14. - hw->flags |= IEEE80211_HW_SIGNAL_UNSPEC;
  15. + __set_bit(IEEE80211_HW_SIGNAL_UNSPEC, hw->flags);
  16. hw->max_signal = 100;
  17. if (IS_ACX100(adev)) {
  18. - adev->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
  19. + adev->hw->wiphy->bands[NL80211_BAND_2GHZ] =
  20. &acx100_band_2GHz;
  21. } else if (IS_ACX111(adev))
  22. - adev->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
  23. + adev->hw->wiphy->bands[NL80211_BAND_2GHZ] =
  24. &acx111_band_2GHz;
  25. else {
  26. log(L_ANY, "Error: Unknown device");
  27. @@ -945,8 +945,8 @@ void acx_op_configure_filter(struct ieee
  28. changed_flags, *total_flags);
  29. /* OWI TODO: Set also FIF_PROBE_REQ ? */
  30. - *total_flags &= (FIF_PROMISC_IN_BSS | FIF_ALLMULTI | FIF_FCSFAIL
  31. - | FIF_CONTROL | FIF_OTHER_BSS);
  32. + *total_flags &= (FIF_ALLMULTI | FIF_FCSFAIL | FIF_CONTROL
  33. + | FIF_OTHER_BSS);
  34. logf1(L_DEBUG, "2: *total_flags=0x%08x\n", *total_flags);
  35. @@ -1045,9 +1045,10 @@ void acx_op_tx(struct ieee80211_hw *hw,
  36. }
  37. int acx_op_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  38. - struct cfg80211_scan_request *req)
  39. + struct ieee80211_scan_request *hw_req)
  40. {
  41. acx_device_t *adev = hw2adev(hw);
  42. + struct cfg80211_scan_request *req = &hw_req->req;
  43. struct sk_buff *skb;
  44. size_t ssid_len = 0;
  45. u8 *ssid = NULL;
  46. @@ -1082,7 +1083,7 @@ int acx_op_hw_scan(struct ieee80211_hw *
  47. goto out;
  48. }
  49. #else
  50. - skb = ieee80211_probereq_get(adev->hw, adev->vif, ssid, ssid_len,
  51. + skb = ieee80211_probereq_get(adev->hw, vif->addr, ssid, ssid_len,
  52. req->ie_len);
  53. if (!skb) {
  54. ret = -ENOMEM;
  55. --- a/main.h
  56. +++ b/main.h
  57. @@ -62,7 +62,7 @@ void acx_op_tx(struct ieee80211_hw *hw,
  58. #endif
  59. int acx_op_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  60. - struct cfg80211_scan_request *req);
  61. + struct ieee80211_scan_request *req);
  62. int acx_recover_hw(acx_device_t *adev);
  63. --- a/cardsetting.c
  64. +++ b/cardsetting.c
  65. @@ -159,7 +159,7 @@ int acx_set_channel(acx_device_t *adev,
  66. int res = 0;
  67. adev->rx_status.freq = freq;
  68. - adev->rx_status.band = IEEE80211_BAND_2GHZ;
  69. + adev->rx_status.band = NL80211_BAND_2GHZ;
  70. adev->channel = channel;
  71. --- a/merge.c
  72. +++ b/merge.c
  73. @@ -2776,7 +2776,10 @@ void acx_irq_work(struct work_struct *wo
  74. /* HOST_INT_SCAN_COMPLETE */
  75. if (irqmasked & HOST_INT_SCAN_COMPLETE) {
  76. if (test_bit(ACX_FLAG_SCANNING, &adev->flags)) {
  77. - ieee80211_scan_completed(adev->hw, false);
  78. + struct cfg80211_scan_info info = {
  79. + .aborted = false
  80. + };
  81. + ieee80211_scan_completed(adev->hw, &info);
  82. log(L_INIT, "scan completed\n");
  83. clear_bit(ACX_FLAG_SCANNING, &adev->flags);
  84. }
  85. @@ -3138,10 +3141,13 @@ int acx_op_start(struct ieee80211_hw *hw
  86. void acx_stop(acx_device_t *adev)
  87. {
  88. + struct cfg80211_scan_info info = {
  89. + .aborted = true
  90. + };
  91. acxmem_lock_flags;
  92. if (test_bit(ACX_FLAG_SCANNING, &adev->flags)) {
  93. - ieee80211_scan_completed(adev->hw, true);
  94. + ieee80211_scan_completed(adev->hw, &info);
  95. acx_issue_cmd(adev, ACX1xx_CMD_STOP_SCAN, NULL, 0);
  96. clear_bit(ACX_FLAG_SCANNING, &adev->flags);
  97. }