History

wext: reformat struct/union declarations

Everytime I need to look for these, my usual strategy fails because it assumes the right formatting. Fix the formatting here to make it consistent with the rest of the kernel.

Johannes Berg committed 10 years ago

Commit 1dad6401 parent 7a087e71 file · +22 −41Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/wireless.h+22−41
@@ -670,8 +670,7 @@ · 669 unmodified lines
670670 /*
671671 * Generic format for most parameters that fit in an int
672672 */
673−struct iw_param
674−{
673+struct iw_param {
675674 __s32 value; /* The value of the parameter itself */
676675 __u8 fixed; /* Hardware should not use auto select */
677676 __u8 disabled; /* Disable the feature */
@@ -682,8 +681,7 @@ struct iw_param · 4 unmodified lines
682681 * For all data larger than 16 octets, we need to use a
683682 * pointer to memory allocated in user space.
684683 */
685−struct iw_point
686−{
684+struct iw_point {
687685 void __user *pointer; /* Pointer to the data (in user space) */
688686 __u16 length; /* number of fields or size in bytes */
689687 __u16 flags; /* Optional params */
@@ -698,8 +696,7 @@ struct iw_point · 8 unmodified lines
698696 * of 10 to get 'm' lower than 10^9, with 'm'= f / (10^'e')...
699697 * The power of 10 is in 'e', the result of the division is in 'm'.
700698 */
701−struct iw_freq
702−{
699+struct iw_freq {
703700 __s32 m; /* Mantissa */
704701 __s16 e; /* Exponent */
705702 __u8 i; /* List index (when in range struct) */
@@ -709,8 +706,7 @@ struct iw_freq · 3 unmodified lines
709706 /*
710707 * Quality of the link
711708 */
712−struct iw_quality
713−{
709+struct iw_quality {
714710 __u8 qual; /* link quality (%retries, SNR,
715711 %missed beacons or better...) */
716712 __u8 level; /* signal level (dBm) */
@@ -725,8 +721,7 @@ struct iw_quality · 8 unmodified lines
725721 * is already pretty exhaustive, and you should use that first.
726722 * This is only additional stats...
727723 */
728−struct iw_discarded
729−{
724+struct iw_discarded {
730725 __u32 nwid; /* Rx : Wrong nwid/essid */
731726 __u32 code; /* Rx : Unable to code/decode (WEP) */
732727 __u32 fragment; /* Rx : Can't perform MAC reassembly */
@@ -738,16 +733,14 @@ struct iw_discarded · 5 unmodified lines
738733 * Packet/Time period missed in the wireless adapter due to
739734 * "wireless" specific problems...
740735 */
741−struct iw_missed
742−{
736+struct iw_missed {
743737 __u32 beacon; /* Missed beacons/superframe */
744738 };
745739
746740 /*
747741 * Quality range (for spy threshold)
748742 */
749−struct iw_thrspy
750−{
743+struct iw_thrspy {
751744 struct sockaddr addr; /* Source address (hw/mac) */
752745 struct iw_quality qual; /* Quality of the link */
753746 struct iw_quality low; /* Low threshold */
@@ -765,8 +758,7 @@ struct iw_thrspy · 11 unmodified lines
765758 * Especially, scan results are required to include an entry for the
766759 * current BSS if the driver is in Managed mode and associated with an AP.
767760 */
768−struct iw_scan_req
769−{
761+struct iw_scan_req {
770762 __u8 scan_type; /* IW_SCAN_TYPE_{ACTIVE,PASSIVE} */
771763 __u8 essid_len;
772764 __u8 num_channels; /* num entries in channel_list;
@@ -827,8 +819,7 @@ struct iw_scan_req · 54 unmodified lines
827819 * RX_SEQ_VALID for SIOCGIWENCODEEXT are optional, but can be useful for
828820 * debugging/testing.
829821 */
830−struct iw_encode_ext
831−{
822+struct iw_encode_ext {
832823 __u32 ext_flags; /* IW_ENCODE_EXT_* */
833824 __u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
834825 __u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
@@ -841,8 +832,7 @@ struct iw_encode_ext · 6 unmodified lines
841832 };
842833
843834 /* SIOCSIWMLME data */
844−struct iw_mlme
845−{
835+struct iw_mlme {
846836 __u16 cmd; /* IW_MLME_* */
847837 __u16 reason_code;
848838 struct sockaddr addr;
@@ -855,16 +845,14 @@ struct iw_mlme · 6 unmodified lines
855845
856846 #define IW_PMKID_LEN 16
857847
858−struct iw_pmksa
859−{
848+struct iw_pmksa {
860849 __u32 cmd; /* IW_PMKSA_* */
861850 struct sockaddr bssid;
862851 __u8 pmkid[IW_PMKID_LEN];
863852 };
864853
865854 /* IWEVMICHAELMICFAILURE data */
866−struct iw_michaelmicfailure
867−{
855+struct iw_michaelmicfailure {
868856 __u32 flags;
869857 struct sockaddr src_addr;
870858 __u8 tsc[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
@@ -872,8 +860,7 @@ struct iw_michaelmicfailure · 1 unmodified line
872860
873861 /* IWEVPMKIDCAND data */
874862 #define IW_PMKID_CAND_PREAUTH 0x00000001 /* RNS pre-authentication enabled */
875−struct iw_pmkid_cand
876−{
863+struct iw_pmkid_cand {
877864 __u32 flags; /* IW_PMKID_CAND_* */
878865 __u32 index; /* the smaller the index, the higher the
879866 * priority */
@@ -884,8 +871,7 @@ struct iw_pmkid_cand · 4 unmodified lines
884871 /*
885872 * Wireless statistics (used for /proc/net/wireless)
886873 */
887−struct iw_statistics
888−{
874+struct iw_statistics {
889875 __u16 status; /* Status
890876 * - device dependent for now */
891877
@@ -897,7 +883,7 @@ struct iw_statistics · 5 unmodified lines
897883
898884 /* ------------------------ IOCTL REQUEST ------------------------ */
899885 /*
900− * This structure defines the payload of an ioctl, and is used
886+ * This structure defines the payload of an ioctl, and is used
901887 * below.
902888 *
903889 * Note that this structure should fit on the memory footprint
@@ -906,8 +892,7 @@ struct iw_statistics · 2 unmodified lines
906892 * You should check this when increasing the structures defined
907893 * above in this file...
908894 */
909−union iwreq_data
910−{
895+union iwreq_data {
911896 /* Config - generic */
912897 char name[IFNAMSIZ];
913898 /* Name : used to verify the presence of wireless extensions.
@@ -944,15 +929,14 @@ union iwreq_data · 30 unmodified lines
944929 * convenience...
945930 * Do I need to remind you about structure size (32 octets) ?
946931 */
947−struct iwreq
948−{
932+struct iwreq {
949933 union
950934 {
951935 char ifrn_name[IFNAMSIZ]; /* if name, e.g. "eth0" */
952936 } ifr_ifrn;
953937
954938 /* Data part (defined just above) */
955− union iwreq_data u;
939+ union iwreq_data u;
956940 };
957941
958942 /* -------------------------- IOCTL DATA -------------------------- */
@@ -965,8 +949,7 @@ struct iwreq · 6 unmodified lines
965949 * Range of parameters
966950 */
967951
968−struct iw_range
969−{
952+struct iw_range {
970953 /* Informative stuff (to choose between different interface) */
971954 __u32 throughput; /* To give an idea... */
972955 /* In theory this value should be the maximum benchmarked
@@ -1069,9 +1052,8 @@ struct iw_range · 96 unmodified lines
10691052 /*
10701053 * Private ioctl interface information
10711054 */
1072−
1073−struct iw_priv_args
1074−{
1055+
1056+struct iw_priv_args {
10751057 __u32 cmd; /* Number of the ioctl to issue */
10761058 __u16 set_args; /* Type and number of args */
10771059 __u16 get_args; /* Type and number of args */
@@ -1088,8 +1070,7 @@ struct iw_priv_args · 10 unmodified lines
10881070 /*
10891071 * A Wireless Event. Contains basically the same data as the ioctl...
10901072 */
1091−struct iw_event
1092−{
1073+struct iw_event {
10931074 __u16 len; /* Real length of this stuff */
10941075 __u16 cmd; /* Wireless IOCTL */
10951076 union iwreq_data u; /* IOCTL fixed payload */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t