[adm5120] fix support for 2.6.38 kernel
[openwrt.git] / package / mac80211 / patches / 603-rt2x00-introduce-rt2x00eeprom.patch
index fc58744..e40d3a9 100644 (file)
 +}
 --- a/drivers/net/wireless/rt2x00/rt2x00.h
 +++ b/drivers/net/wireless/rt2x00/rt2x00.h
 +}
 --- a/drivers/net/wireless/rt2x00/rt2x00.h
 +++ b/drivers/net/wireless/rt2x00/rt2x00.h
-@@ -538,6 +538,7 @@ struct rt2x00lib_ops {
+@@ -560,6 +560,7 @@ struct rt2x00lib_ops {
                               const u8 *data, const size_t len);
        int (*load_firmware) (struct rt2x00_dev *rt2x00dev,
                              const u8 *data, const size_t len);
                               const u8 *data, const size_t len);
        int (*load_firmware) (struct rt2x00_dev *rt2x00dev,
                              const u8 *data, const size_t len);
  
        /*
         * Device initialization/deinitialization handlers.
  
        /*
         * Device initialization/deinitialization handlers.
-@@ -684,6 +685,7 @@ enum rt2x00_capability_flags {
+@@ -713,6 +714,7 @@ enum rt2x00_capability_flags {
        REQUIRE_SW_SEQNO,
        REQUIRE_HT_TX_DESC,
        REQUIRE_PS_AUTOWAKE,
        REQUIRE_SW_SEQNO,
        REQUIRE_HT_TX_DESC,
        REQUIRE_PS_AUTOWAKE,
  
        /*
         * Capabilities
  
        /*
         * Capabilities
-@@ -939,6 +941,11 @@ struct rt2x00_dev {
+@@ -968,6 +970,11 @@ struct rt2x00_dev {
        const struct firmware *fw;
  
        /*
        const struct firmware *fw;
  
        /*
        DECLARE_KFIFO_PTR(txstatus_fifo, u32);
 --- a/drivers/net/wireless/rt2x00/rt2x00lib.h
 +++ b/drivers/net/wireless/rt2x00/rt2x00lib.h
        DECLARE_KFIFO_PTR(txstatus_fifo, u32);
 --- a/drivers/net/wireless/rt2x00/rt2x00lib.h
 +++ b/drivers/net/wireless/rt2x00/rt2x00lib.h
-@@ -309,6 +309,22 @@ static inline void rt2x00lib_free_firmwa
+@@ -322,6 +322,22 @@ static inline void rt2x00lib_free_firmwa
  #endif /* CONFIG_RT2X00_LIB_FIRMWARE */
  
  /*
  #endif /* CONFIG_RT2X00_LIB_FIRMWARE */
  
  /*
  
  #ifdef CONFIG_PCI
  static void rt2800pci_eepromregister_read(struct eeprom_93cx6 *eeprom)
  
  #ifdef CONFIG_PCI
  static void rt2800pci_eepromregister_read(struct eeprom_93cx6 *eeprom)
-@@ -315,6 +305,20 @@ static int rt2800pci_write_firmware(stru
+@@ -311,6 +301,20 @@ static int rt2800pci_write_firmware(stru
  }
  
  /*
  }
  
  /*
   * Initialization functions.
   */
  static bool rt2800pci_get_entry_state(struct queue_entry *entry)
   * Initialization functions.
   */
  static bool rt2800pci_get_entry_state(struct queue_entry *entry)
-@@ -1057,6 +1061,7 @@ static const struct rt2x00lib_ops rt2800
+@@ -1052,6 +1056,7 @@ static const struct rt2x00lib_ops rt2800
        .get_firmware_name      = rt2800pci_get_firmware_name,
        .check_firmware         = rt2800_check_firmware,
        .load_firmware          = rt2800_load_firmware,
        .get_firmware_name      = rt2800pci_get_firmware_name,
        .check_firmware         = rt2800_check_firmware,
        .load_firmware          = rt2800_load_firmware,
        .get_entry_state        = rt2800pci_get_entry_state,
 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c
 +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
        .get_entry_state        = rt2800pci_get_entry_state,
 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c
 +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
-@@ -1122,6 +1122,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
-       INIT_WORK(&rt2x00dev->intf_work, rt2x00lib_intf_scheduled);
-       INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup);
+@@ -1165,6 +1165,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
+                   BIT(NL80211_IFTYPE_MESH_POINT) |
+                   BIT(NL80211_IFTYPE_WDS);
  
 +      retval = rt2x00lib_load_eeprom_file(rt2x00dev);
 +      if (retval)
 +              goto exit;
 +
        /*
  
 +      retval = rt2x00lib_load_eeprom_file(rt2x00dev);
 +      if (retval)
 +              goto exit;
 +
        /*
-        * Let the driver probe the device to detect the capabilities.
+        * Initialize work.
         */
         */
-@@ -1223,6 +1227,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
-        * Free queue structures.
+@@ -1288,6 +1292,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
         */
         */
-       rt2x00queue_free(rt2x00dev);
+       if (rt2x00dev->drv_data)
+               kfree(rt2x00dev->drv_data);
 +
 +      /*
 +       * Free EEPROM image.
 +
 +      /*
 +       * Free EEPROM image.
This page took 0.026879 seconds and 4 git commands to generate.