Changeset 26218


Ignore:
Timestamp:
2011-03-18T04:41:22+01:00 (7 years ago)
Author:
nbd
Message:

wireless-tools: remove some more unnecessary stuff from iwconfig

Location:
trunk/package/wireless-tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/wireless-tools/Makefile

    r18108 r26218  
    5757                CFLAGS="$(TARGET_CFLAGS) -I." \ 
    5858                BUILD_WE_ESSENTIAL=y \ 
     59                LIBS="-lm -Wl,--gc-sections" \ 
    5960                libiw.so.$(PKG_VERSION) iwmulticall 
    6061        $(MAKE) -C $(PKG_BUILD_DIR) \ 
     
    7677        $(INSTALL_DIR) $(1)/usr/sbin 
    7778        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/iwconfig $(1)/usr/sbin/ 
    78         ln -sf iwconfig $(1)/usr/sbin/iwgetid 
    7979        ln -sf iwconfig $(1)/usr/sbin/iwlist 
    8080        ln -sf iwconfig $(1)/usr/sbin/iwpriv 
    81         ln -sf iwconfig $(1)/usr/sbin/iwspy 
    8281endef 
    8382 
  • trunk/package/wireless-tools/patches/003-we_essential_def.patch

    r20194 r26218  
    208208--- a/iwmulticall.c 
    209209+++ b/iwmulticall.c 
    210 @@ -76,12 +76,10 @@ extern int 
    211  #undef iw_usage 
    212  #undef main 
    213   
    214 -#ifndef WE_ESSENTIAL 
    215  /* Get iwspy in there, it's not that big. */ 
     210@@ -81,7 +81,7 @@ extern int 
    216211 #define main(args...) main_iwspy(args) 
    217212 #include "iwspy.c" 
    218213 #undef main 
    219214-#endif /* WE_ESSENTIAL */ 
     215+#endif 
    220216  
    221217 /* Get iwpriv in there. Mandatory for HostAP and some other drivers. */ 
    222218 #define main(args...) main_iwpriv(args) 
    223 @@ -128,10 +126,8 @@ main(int   argc, 
    224      return(main_iwconfig(argc, argv)); 
    225    if(!strcmp(call_name, "iwlist")) 
    226      return(main_iwlist(argc, argv)); 
    227 -#ifndef WE_ESSENTIAL 
     219@@ -90,12 +90,14 @@ extern int 
     220 #undef iw_usage 
     221 #undef main 
     222  
     223+#ifndef WE_ESSENTIAL 
     224 /* Do we really need iwgetid ? Well, it's not like it's a big one */ 
     225 #define main(args...) main_iwgetid(args) 
     226 #define iw_usage(args...) iwgetid_usage(args) 
     227 #include "iwgetid.c" 
     228 #undef iw_usage 
     229 #undef main 
     230+#endif 
     231  
     232 /* iwevent is useless for most people, don't grab it ? */ 
     233  
     234@@ -131,11 +133,13 @@ main(int  argc, 
     235 #ifndef WE_ESSENTIAL 
    228236   if(!strcmp(call_name, "iwspy")) 
    229237     return(main_iwspy(argc, argv)); 
    230238-#endif /* WE_ESSENTIAL */ 
     239+#endif 
    231240   if(!strcmp(call_name, "iwpriv")) 
    232241     return(main_iwpriv(argc, argv)); 
     242+#ifndef WE_ESSENTIAL 
    233243   if(!strcmp(call_name, "iwgetid")) 
     244     return(main_iwgetid(argc, argv)); 
     245+#endif 
     246  
     247   /* Uh oh... Not supposed to come here. */ 
     248   printf("iwmulticall : you are not supposed to call me this way...\n"); 
     249--- a/iwlib.c 
     250+++ b/iwlib.c 
     251@@ -113,6 +113,7 @@ const struct iw_modul_descr iw_modul_lis 
     252   { IW_MODUL_11A, "11a", "IEEE 802.11a (5 GHz, up to 54 Mb/s)" }, 
     253   { IW_MODUL_11B, "11b", "IEEE 802.11b (2.4 GHz, up to 11 Mb/s)" }, 
     254  
     255+#ifndef WE_ESSENTIAL 
     256   /* Proprietary aggregates */ 
     257   { IW_MODUL_TURBO | IW_MODUL_11A, "turboa", 
     258     "Atheros turbo mode at 5 GHz (up to 108 Mb/s)" }, 
     259@@ -120,6 +121,7 @@ const struct iw_modul_descr iw_modul_lis 
     260     "Atheros turbo mode at 2.4 GHz (up to 108 Mb/s)" }, 
     261   { IW_MODUL_PBCC | IW_MODUL_11B, "11+", 
     262     "TI 802.11+ (2.4 GHz, up to 22 Mb/s)" }, 
     263+#endif 
     264  
     265   /* Individual modulations */ 
     266   { IW_MODUL_OFDM_G, "OFDMg", 
     267@@ -129,6 +131,7 @@ const struct iw_modul_descr iw_modul_lis 
     268   { IW_MODUL_DS, "DS", "802.11 Direct Sequence (2.4 GHz, up to 2 Mb/s)" }, 
     269   { IW_MODUL_FH, "FH", "802.11 Frequency Hopping (2,4 GHz, up to 2 Mb/s)" }, 
     270  
     271+#ifndef WE_ESSENTIAL 
     272   /* Proprietary modulations */ 
     273   { IW_MODUL_TURBO, "turbo", 
     274     "Atheros turbo mode, channel bonding (up to 108 Mb/s)" }, 
     275@@ -136,6 +139,7 @@ const struct iw_modul_descr iw_modul_lis 
     276     "TI 802.11+ higher rates (2.4 GHz, up to 22 Mb/s)" }, 
     277   { IW_MODUL_CUSTOM, "custom", 
     278     "Driver specific modulation (check driver documentation)" }, 
     279+#endif 
     280 }; 
     281  
     282 /* Disable runtime version warning in iw_get_range_info() */ 
     283@@ -440,6 +444,7 @@ iw_print_version_info(const char *  tooln 
     284       return -1; 
     285     } 
     286  
     287+#ifndef WE_ESSENTIAL 
     288   /* Information about the tools themselves */ 
     289   if(toolname != NULL) 
     290     printf("%-8.16s  Wireless-Tools version %d\n", toolname, WT_VERSION); 
     291@@ -452,6 +457,7 @@ iw_print_version_info(const char *  tooln 
     292   if(we_kernel_version > 15) 
     293     printf("Kernel    Currently compiled with Wireless Extension v%d.\n\n", 
     294           we_kernel_version); 
     295+#endif 
     296  
     297   /* Version for each device */ 
     298   iw_enum_devices(skfd, &print_iface_version_info, NULL, 0); 
     299@@ -501,6 +507,7 @@ iw_get_range_info(int               skfd, 
     300       /* Copy stuff at the right place, ignore extra */ 
     301       memcpy((char *) range, buffer, sizeof(iwrange)); 
     302     } 
     303+#ifndef WE_ESSENTIAL 
     304   else 
     305     { 
     306       /* Zero unknown fields */ 
     307@@ -574,6 +581,7 @@ iw_get_range_info(int               skfd, 
     308        * If the driver source has not been updated to the latest, it doesn't 
     309        * matter because the new fields are set to zero */ 
     310     } 
     311+#endif 
     312  
     313   /* Don't complain twice. 
     314    * In theory, the test apply to each individual driver, but usually 
     315@@ -1542,6 +1550,7 @@ iw_print_key(char *                       buffer, 
     316     } 
     317 } 
     318  
     319+#ifndef WE_ESSENTIAL 
     320 /*------------------------------------------------------------------*/ 
     321 /* 
     322  * Convert a passphrase into a key 
     323@@ -1556,6 +1565,7 @@ iw_pass_key(const char *  input, 
     324   fprintf(stderr, "Error: Passphrase not implemented\n"); 
     325   return(-1); 
     326 } 
     327+#endif 
     328  
     329 /*------------------------------------------------------------------*/ 
     330 /* 
     331@@ -1578,12 +1588,14 @@ iw_in_key(const char *          input, 
     332        keylen = IW_ENCODING_TOKEN_MAX; 
     333       memcpy(key, input + 2, keylen); 
     334     } 
     335+#ifndef WE_ESSENTIAL 
     336   else 
     337     if(!strncmp(input, "p:", 2)) 
     338       { 
     339        /* Second case : as a passphrase (PrismII cards) */ 
     340        return(iw_pass_key(input + 2, key));            /* skip "p:" */ 
     341       } 
     342+#endif 
     343     else 
     344       { 
     345        const char *    p; 
     346--- a/Makefile 
     347+++ b/Makefile 
     348@@ -195,9 +195,9 @@ install-iwmulticall:: iwmulticall 
     349        install -m 755 $< $(INSTALL_DIR)/iwconfig 
     350        ( cd $(INSTALL_DIR) ; \ 
     351          ln -f -s iwconfig iwlist ; \ 
     352-         ln -f -s iwconfig iwspy ; \ 
     353+         $(if $(BUILD_WE_ESSENTIAL),,ln -f -s iwconfig iwspy ;) \ 
     354          ln -f -s iwconfig iwpriv ; \ 
     355-         ln -f -s iwconfig iwgetid ) 
     356+         $(if $(BUILD_WE_ESSENTIAL),,ln -f -s iwconfig iwgetid ) ) 
     357  
     358 clean:: 
     359        $(RM_CMD)  
Note: See TracChangeset for help on using the changeset viewer.