Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Cant compile rtl8187b on kernel2.6.26-1-amd64

rtl-wifi
andre duke
2009-04-16
2013-05-02
  • andre duke
    andre duke
    2009-04-16

    The headers and sources are ok...

    this is the error:

    carolandre:/home/carolandre/arquivos/rtl8187b-modified# ./makedrv
    rm -fr *.mod.c *.mod *.o .*.cmd *.mod.* *.ko *.o *~
    make -C /lib/modules/2.6.26-1-amd64/build M=/home/carolandre/arquivos/rtl8187b-modified/ieee80211 CC=gcc modules
    make[1]: Enter in directory `/usr/src/linux-source-2.6.26'
    scripts/Makefile.build:46: *** CFLAGS was changed in "/home/carolandre/arquivos/rtl8187b-modified/ieee80211/Makefile". Fix it to use EXTRA_CFLAGS. stop.
    make[1]: ** [_module_/home/carolandre/arquivos/rtl8187b-modified/ieee80211] Error 2
    make[1]: exit directory `/usr/src/linux-source-2.6.26'
    make: ** [modules] Error 2
    rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
    make -C /lib/modules/2.6.26-1-amd64/build M=/home/carolandre/arquivos/rtl8187b-modified/rtl8187 CC=gcc modules
    make[1]: Enter in directory `/usr/src/linux-source-2.6.26'
    scripts/Makefile.build:46: *** CFLAGS was changed in "/home/carolandre/arquivos/rtl8187b-modified/rtl8187/Makefile". Fix it to use EXTRA_CFLAGS. stop.
    make[1]: ** [_module_/home/carolandre/arquivos/rtl8187b-modified/rtl8187] Error 2
    make[1]: exit directory `/usr/src/linux-source-2.6.26'
    make: ** [modules] Error 2
    carolandre:/home/carolandre/arquivos/rtl8187b-modified#

    Some clue?

     
    • fredcrs
      fredcrs
      2009-04-24

      I am getting something like that on kernel 2.6.28-11-generic amd64

      maybe something with the amd64??

       
    • fredcrs
      fredcrs
      2009-04-24

      OH sorry forgot to post the error
      rtl8185

        CC [M]  /opt/rtl-wifi/ieee80211/ieee80211_wx.o
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c: In function ‘ieee80211_translate_scan’:
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:62: warning: passing argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:62: warning: passing argument 3 of ‘iwe_stream_add_event’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:62: warning: passing argument 4 of ‘iwe_stream_add_event’ makes pointer from integer without a cast
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:62: error: too few arguments to function ‘iwe_stream_add_event’
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:71: warning: passing argument 1 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:71: warning: passing argument 3 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:71: warning: passing argument 4 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:71: error: too few arguments to function ‘iwe_stream_add_point’
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:74: warning: passing argument 1 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:74: warning: passing argument 3 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:74: warning: passing argument 4 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:74: error: too few arguments to function ‘iwe_stream_add_point’
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:81: warning: passing argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:81: warning: passing argument 3 of ‘iwe_stream_add_event’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:81: warning: passing argument 4 of ‘iwe_stream_add_event’ makes pointer from integer without a cast
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:81: error: too few arguments to function ‘iwe_stream_add_event’
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:91: warning: passing argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:91: warning: passing argument 3 of ‘iwe_stream_add_event’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:91: warning: passing argument 4 of ‘iwe_stream_add_event’ makes pointer from integer without a cast
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:91: error: too few arguments to function ‘iwe_stream_add_event’
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:99: warning: passing argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:99: warning: passing argument 3 of ‘iwe_stream_add_event’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:99: warning: passing argument 4 of ‘iwe_stream_add_event’ makes pointer from integer without a cast
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:99: error: too few arguments to function ‘iwe_stream_add_event’
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:102: warning: passing argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:102: warning: passing argument 3 of ‘iwe_stream_add_event’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:102: warning: passing argument 4 of ‘iwe_stream_add_event’ makes pointer from integer without a cast
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:102: error: too few arguments to function ‘iwe_stream_add_event’
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:111: warning: passing argument 1 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:111: warning: passing argument 3 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:111: warning: passing argument 4 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:111: error: too few arguments to function ‘iwe_stream_add_point’
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:141: warning: passing argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:141: warning: passing argument 3 of ‘iwe_stream_add_event’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:141: warning: passing argument 4 of ‘iwe_stream_add_event’ makes pointer from integer without a cast
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:141: error: too few arguments to function ‘iwe_stream_add_event’
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:146: warning: passing argument 1 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:146: warning: passing argument 3 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:146: warning: passing argument 4 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:146: error: too few arguments to function ‘iwe_stream_add_point’
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:162: warning: passing argument 1 of ‘iwe_stream_add_event’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:162: warning: passing argument 3 of ‘iwe_stream_add_event’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:162: warning: passing argument 4 of ‘iwe_stream_add_event’ makes pointer from integer without a cast
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:162: error: too few arguments to function ‘iwe_stream_add_event’
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:169: warning: passing argument 1 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:169: warning: passing argument 3 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:169: warning: passing argument 4 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:169: error: too few arguments to function ‘iwe_stream_add_point’
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:183: warning: passing argument 1 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:183: warning: passing argument 3 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:183: warning: passing argument 4 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:183: error: too few arguments to function ‘iwe_stream_add_point’
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:198: warning: passing argument 1 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:198: warning: passing argument 3 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:198: warning: passing argument 4 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:198: error: too few arguments to function ‘iwe_stream_add_point’
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:209: warning: passing argument 1 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:209: warning: passing argument 3 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:209: warning: passing argument 4 of ‘iwe_stream_add_point’ from incompatible pointer type
      /opt/rtl-wifi/ieee80211/ieee80211_wx.c:209: error: too few arguments to function ‘iwe_stream_add_point’
      make[3]: ** [/opt/rtl-wifi/ieee80211/ieee80211_wx.o] Erro 1
      make[2]: ** [/opt/rtl-wifi/ieee80211] Erro 2
      make[1]: ** [_module_/opt/rtl-wifi] Erro 2
      make[1]: Saindo do diretório `/usr/src/linux-headers-2.6.28-11-generic'
      make: ** [modules] Erro 2

       
    • kernel people've made declaration changes to those functions. my patch is down there:

      one tiny but, though - it breaks compatibility with the old apis. there's a way to make it both ways but I just don't need it and don't want to overcomplicate code.

      Index: ieee80211/ieee80211_wx.c

      --- ieee80211/ieee80211_wx.c    (revision 83)
      +++ ieee80211/ieee80211_wx.c    (working copy)
      @@ -54,12 +54,15 @@
           struct iw_event iwe;
           int i, j;
           u8 max_rate, rate;
      +   
      +    struct iw_request_info iwri;
      +    memset(&iwri, 0, sizeof(iwri));

           /* First entry *MUST* be the AP MAC address */
           iwe.cmd = SIOCGIWAP;
           iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
           memcpy(iwe.u.ap_addr.sa_data, network->bssid, ETH_ALEN);
      -    start = iwe_stream_add_event(start, stop, &iwe, IW_EV_ADDR_LEN);
      +    start = iwe_stream_add_event(&iwri, start, stop, &iwe, IW_EV_ADDR_LEN);

           /* Remaining entries will be displayed in the order we provide them */

      @@ -68,17 +71,17 @@
           iwe.u.data.flags = 1;
           if (network->flags & NETWORK_EMPTY_ESSID) {
               iwe.u.data.length = sizeof("<hidden>");
      -        start = iwe_stream_add_point(start, stop, &iwe, "<hidden>");
      +        start = iwe_stream_add_point(&iwri, start, stop, &iwe, "<hidden>");
           } else {
               iwe.u.data.length = min(network->ssid_len, (u8) 32);
      -        start = iwe_stream_add_point(start, stop, &iwe, network->ssid);
      +        start = iwe_stream_add_point(&iwri, start, stop, &iwe, network->ssid);
           }

           /* Add the protocol name */
           iwe.cmd = SIOCGIWNAME;
           snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11%s",
                ieee80211_modes[network->mode]);
      -    start = iwe_stream_add_event(start, stop, &iwe, IW_EV_CHAR_LEN);
      +    start = iwe_stream_add_event(&iwri, start, stop, &iwe, IW_EV_CHAR_LEN);

           /* Add mode */
           iwe.cmd = SIOCGIWMODE;
      @@ -88,7 +91,7 @@
               else
                   iwe.u.mode = IW_MODE_ADHOC;

      -        start = iwe_stream_add_event(start, stop, &iwe, IW_EV_UINT_LEN);
      +        start = iwe_stream_add_event(&iwri, start, stop, &iwe, IW_EV_UINT_LEN);
           }

           /* Add channel and frequency */
      @@ -96,10 +99,10 @@
           iwe.u.freq.m = network->channel;
           iwe.u.freq.e = 0;
           iwe.u.freq.i = 0;
      -    start = iwe_stream_add_event(start, stop, &iwe, IW_EV_FREQ_LEN);
      +    start = iwe_stream_add_event(&iwri, start, stop, &iwe, IW_EV_FREQ_LEN);

           iwe.u.freq.e = 6;
      -    start = iwe_stream_add_event(start, stop, &iwe, IW_EV_FREQ_LEN);
      +    start = iwe_stream_add_event(&iwri, start, stop, &iwe, IW_EV_FREQ_LEN);

           /* Add encryption capability */
           iwe.cmd = SIOCGIWENCODE;
      @@ -108,7 +111,7 @@
           else
               iwe.u.data.flags = IW_ENCODE_DISABLED;
           iwe.u.data.length = 0;
      -    start = iwe_stream_add_point(start, stop, &iwe, network->ssid);
      +    start = iwe_stream_add_point(&iwri, start, stop, &iwe, network->ssid);

           /* Add basic and extended rates */
           max_rate = 0;
      @@ -137,13 +140,13 @@
           iwe.cmd = SIOCGIWRATE;
           iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
           iwe.u.bitrate.value = max_rate * 500000;
      -    start = iwe_stream_add_event(start, stop, &iwe,
      +    start = iwe_stream_add_event(&iwri, start, stop, &iwe,
                            IW_EV_PARAM_LEN);

           iwe.cmd = IWEVCUSTOM;
           iwe.u.data.length = p - custom;
           if (iwe.u.data.length)
      -        start = iwe_stream_add_point(start, stop, &iwe, custom);
      +        start = iwe_stream_add_point(&iwri, start, stop, &iwe, custom);

           /* Add quality statistics */
           /* TODO: Fix these values... */
      @@ -159,14 +162,14 @@
           if (!(network->stats.mask & IEEE80211_STATMASK_SIGNAL))
               iwe.u.qual.updated |= IW_QUAL_QUAL_INVALID;

      -    start = iwe_stream_add_event(start, stop, &iwe, IW_EV_QUAL_LEN);
      +    start = iwe_stream_add_event(&iwri, start, stop, &iwe, IW_EV_QUAL_LEN);

           iwe.cmd = IWEVCUSTOM;
           p = custom;

           iwe.u.data.length = p - custom;
           if (iwe.u.data.length)
      -        start = iwe_stream_add_point(start, stop, &iwe, custom);
      +        start = iwe_stream_add_point(&iwri, start, stop, &iwe, custom);

           if (ieee->wpa_enabled && network->wpa_ie_len){
               char buf[MAX_WPA_IE_LEN * 2 + 30];
      @@ -180,7 +183,7 @@
               memset(&iwe, 0, sizeof(iwe));
               iwe.cmd = IWEVCUSTOM;
               iwe.u.data.length = strlen(buf);
      -        start = iwe_stream_add_point(start, stop, &iwe, buf);
      +        start = iwe_stream_add_point(&iwri, start, stop, &iwe, buf);
           }

           if (ieee->wpa_enabled && network->rsn_ie_len){
      @@ -195,7 +198,7 @@
               memset(&iwe, 0, sizeof(iwe));
               iwe.cmd = IWEVCUSTOM;
               iwe.u.data.length = strlen(buf);
      -        start = iwe_stream_add_point(start, stop, &iwe, buf);
      +        start = iwe_stream_add_point(&iwri, start, stop, &iwe, buf);
           }

           /* Add EXTRA: Age to display seconds since last beacon/probe response
      @@ -206,7 +209,7 @@
                     " Last beacon: %lums ago", (jiffies - network->last_scanned) / (HZ / 100));
           iwe.u.data.length = p - custom;
           if (iwe.u.data.length)
      -        start = iwe_stream_add_point(start, stop, &iwe, custom);
      +        start = iwe_stream_add_point(&iwri, start, stop, &iwe, custom);

           return start;
      Index: rtl8187-newstack/r8187.h
      ===================================================================
      --- rtl8187-newstack/r8187.h    (revision 83)
      +++ rtl8187-newstack/r8187.h    (working copy)
      @@ -53,7 +53,7 @@
      #include <linux/random.h>

      #include <linux/version.h>

      #include <asm/io.h>

      -#include <asm/semaphore.h>

      +#include <linux/semaphore.h>

      #include "ieee80211.h"

      @@ -92,9 +92,9 @@
      #define EPROM_TXPW2    0x1b    /* Transmit Power Level, channels 11 to 14 */

      #define EPROM_TXPW1    0x3d    /* Transmit Power Level, channels 7 to 10 */

      -/* The following doesn't match the datasheet, which gives word 0x5 as */
      -/* msb of version + Options function */
      -#define EPROM_TXPW_BASE 0x05
      +/* The following doesn't match the datasheet, which gives word 0x5 as */

      +/* msb of version + Options function */

      +#define EPROM_TXPW_BASE 0x05

      /* possible values for the RF Chip ID */

      #define EPROM_RFCHIPID_RTL8225U    5

      @@ -319,6 +319,6 @@
      void write_phy(struct net_device *dev, u8 adr, u8 data);

      void write_phy_cck(struct net_device *dev, u8 adr, u32 data);

      void write_phy_ofdm(struct net_device *dev, u8 adr, u32 data);

      -void rtl8185_tx_antenna(struct net_device *dev, u8 ant);
      +void rtl8185_tx_antenna(struct net_device *dev, u8 ant);

      void rtl8187_set_rxconf(struct net_device *dev);

      #endif

      Index: rtl818x-newstack/r8180.h

      --- rtl818x-newstack/r8180.h    (revision 83)
      +++ rtl818x-newstack/r8180.h    (working copy)
      @@ -51,7 +51,7 @@
      #include <linux/if_arp.h>
      #include "ieee80211.h"
      #include <asm/io.h>
      -#include <asm/semaphore.h>
      +#include <linux/semaphore.h>

      #define RTL_IOCTL_WPA_SUPPLICANT        SIOCIWFIRSTPRIV+30