From 484cb254482ee644cc2981d1e2753fca2718bcd3 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Mon, 15 Aug 2011 18:58:52 +0200 Subject: [PATCH] carl9170 firmware: checkpatch/style fixes Signed-off-by: Christian Lamparter --- carlfw/CMakeLists.txt | 2 +- carlfw/include/config.h | 8 ++++---- carlfw/include/dma.h | 2 +- carlfw/include/wl.h | 4 +--- carlfw/src/hostif.c | 3 +-- carlfw/src/main.c | 6 +++--- carlfw/src/wlan.c | 14 ++++++-------- carlfw/usb/usb.c | 2 +- config/CMakeLists.txt | 4 ++-- include/shared/fwcmd.h | 2 +- include/shared/version.h | 4 ++-- 11 files changed, 23 insertions(+), 28 deletions(-) diff --git a/carlfw/CMakeLists.txt b/carlfw/CMakeLists.txt index 00fbe8f..1c9f0c8 100644 --- a/carlfw/CMakeLists.txt +++ b/carlfw/CMakeLists.txt @@ -54,7 +54,7 @@ add_custom_command( ARGS --strip-unneeded -O binary -j .fwdsc carl9170.elf carl9170.dsc TARGET firmware OUTPUTS carl9170.dsc) - + add_custom_command( SOURCE firmware TARGET firmware diff --git a/carlfw/include/config.h b/carlfw/include/config.h index bebb260..739c0da 100644 --- a/carlfw/include/config.h +++ b/carlfw/include/config.h @@ -31,9 +31,9 @@ # error "See: http://gcc.gnu.org/gcc-4.4/changes.html / Caveats No. 4" #endif -#if ((defined CONFIG_CARL9170FW_PRINTF) && \ - (!defined CONFIG_CARL9170FW_DEBUG_USB) && \ - (!defined CONFIG_CARL9170FW_DEBUG_UART)) +#if ((defined CONFIG_CARL9170FW_PRINTF) && \ + (!defined CONFIG_CARL9170FW_DEBUG_USB) && \ + (!defined CONFIG_CARL9170FW_DEBUG_UART)) # warning "You have disabled all debug message transports." # warning "However CONFIG_CARL9170FW_PRINTF is still set..." # warning "Which is a waste of firmware space, if you ask me." @@ -55,7 +55,7 @@ #define CONFIG_CARL9170FW_BACK_REQS_NUM 4 #if ((defined CONFIG_CARL9170FW_DEBUG) || \ - (defined CONFIG_CARL9170FW_LOOPBACK)) + (defined CONFIG_CARL9170FW_LOOPBACK)) #define CARL9170FW_UNUSABLE y #endif diff --git a/carlfw/include/dma.h b/carlfw/include/dma.h index 51d0db4..8f3a9df 100644 --- a/carlfw/include/dma.h +++ b/carlfw/include/dma.h @@ -283,7 +283,7 @@ static inline __inline struct dma_desc *dma_dequeue_not_bits(struct dma_queue *q desc = (queue)->head) #define __for_each_desc_continue(desc, queue) \ - for (;desc != (queue)->terminator; \ + for (; desc != (queue)->terminator; \ desc = (desc)->lastAddr->nextAddr) #define __for_each_desc(desc, queue) \ diff --git a/carlfw/include/wl.h b/carlfw/include/wl.h index 9064dcb..9af4fdb 100644 --- a/carlfw/include/wl.h +++ b/carlfw/include/wl.h @@ -263,9 +263,7 @@ void wlan_modify_beacon(const unsigned int vif, const unsigned int bcn_addr, const unsigned int bcn_len); -void wlan_tx_complete(struct carl9170_tx_superframe *super, - bool txs); - +void wlan_tx_complete(struct carl9170_tx_superframe *super, bool txs); void wlan_prepare_wol(void); static inline void __check_wlantx(void) diff --git a/carlfw/src/hostif.c b/carlfw/src/hostif.c index 0e7cbf2..0708a72 100644 --- a/carlfw/src/hostif.c +++ b/carlfw/src/hostif.c @@ -134,9 +134,8 @@ static void handle_download_exception(void) } __for_each_desc_continue(desc, &fw.pta.down_queue) { - if ((desc->status & AR9170_OWN_BITS) == AR9170_OWN_BITS_SW) { + if ((desc->status & AR9170_OWN_BITS) == AR9170_OWN_BITS_SW) dma_fix_downqueue(desc); - } } diff --git a/carlfw/src/main.c b/carlfw/src/main.c index a4d24b6..17cbaf9 100644 --- a/carlfw/src/main.c +++ b/carlfw/src/main.c @@ -54,10 +54,10 @@ void clock_set(enum cpu_clock_t clock_, bool on) * So watch out, if you need _stable_ timer interrupts. */ #ifdef CONFIG_CARL9170FW_RADIO_FUNCTIONS - if (fw.phy.frequency < 3000000) + if (fw.phy.frequency < 3000000) set(AR9170_PWR_REG_PLL_ADDAC, 0x5163); - else - set(AR9170_PWR_REG_PLL_ADDAC, 0x5143); + else + set(AR9170_PWR_REG_PLL_ADDAC, 0x5143); #else set(AR9170_PWR_REG_PLL_ADDAC, 0x5163); #endif /* CONFIG_CARL9170FW_RADIO_FUNCTIONS */ diff --git a/carlfw/src/wlan.c b/carlfw/src/wlan.c index 59e9141..50b1f2b 100644 --- a/carlfw/src/wlan.c +++ b/carlfw/src/wlan.c @@ -213,7 +213,7 @@ static bool wlan_tx_consume_retry(struct carl9170_tx_superframe *super) static inline u16 get_tid(struct ieee80211_hdr *hdr) { - return (ieee80211_get_qos_ctl(hdr))[0] & IEEE80211_QOS_CTL_TID_MASK; + return (ieee80211_get_qos_ctl(hdr))[0] & IEEE80211_QOS_CTL_TID_MASK; } /* This function will only work on uint32_t-aligned pointers! */ @@ -330,9 +330,8 @@ static void _wlan_tx(struct dma_desc *desc) { struct carl9170_tx_superframe *super = get_super(desc); - if (unlikely(super->s.assign_seq)) { + if (unlikely(super->s.assign_seq)) wlan_assign_seq(&super->f.data.i3e, super->s.vif_id); - } if (unlikely(super->s.ampdu_commit_density)) { set(AR9170_MAC_REG_AMPDU_DENSITY, @@ -730,9 +729,8 @@ static bool wlan_rx_wol_magic_packet(struct ieee80211_hdr *hdr, unsigned int len found = 0; } - if (found == (6 + 16 * 6)) { + if (found == (6 + 16 * 6)) return true; - } data++; } @@ -780,9 +778,9 @@ static void wlan_wol_connection_monitor(void) null->frame_control = cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC | IEEE80211_FCTL_TODS); - memcpy(null->addr1, fw.wlan.wol.cmd.bssid, 6); - memcpy(null->addr2, fw.wlan.wol.cmd.mac, 6); - memcpy(null->addr3, fw.wlan.wol.cmd.bssid, 6); + memcpy(null->addr1, fw.wlan.wol.cmd.bssid, 6); + memcpy(null->addr2, fw.wlan.wol.cmd.mac, 6); + memcpy(null->addr3, fw.wlan.wol.cmd.bssid, 6); wlan_tx_fw(&nullf->s, wlan_wol_connect_callback); } diff --git a/carlfw/usb/usb.c b/carlfw/usb/usb.c index 0d33980..9ff31c4 100644 --- a/carlfw/usb/usb.c +++ b/carlfw/usb/usb.c @@ -575,7 +575,7 @@ static int usb_get_interface(const struct usb_ctrlrequest *ctrl) static int usb_manipulate_feature(const struct usb_ctrlrequest *ctrl, bool __unused clear) { unsigned int feature; - if (USB_CHECK_REQTYPE(ctrl, USB_RECIP_DEVICE, USB_DIR_OUT)) + if (USB_CHECK_REQTYPE(ctrl, USB_RECIP_DEVICE, USB_DIR_OUT)) return -1; if (usb_configured() == false) diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt index b230348..234f2a8 100644 --- a/config/CMakeLists.txt +++ b/config/CMakeLists.txt @@ -12,7 +12,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) file(MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../include/generated") LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../extra") -FIND_PACKAGE(GPERF REQUIRED) +FIND_PACKAGE(GPERF REQUIRED) BISON_TARGET(zconf zconf.y zconf.tab.c COMPILE_FLAGS "-l -b zconf -p zconf") FLEX_TARGET(zconfscan zconf.l lex.zconf.c COMPILE_FLAGS "-Pzconf -L") @@ -22,6 +22,6 @@ SET(zconf_deps ${FLEX_zconfscan_OUTPUTS} ${GPERF_zconfhash_OUTPUTS}) SET_SOURCE_FILES_PROPERTIES(${BISON_zconf_OUTPUTS} PROPERTIES OBJECT_DEPENDS "${zconf_deps}") -set(conf_src conf.c ${BISON_zconf_OUTPUTS}) +set(conf_src conf.c ${BISON_zconf_OUTPUTS}) add_executable(conf ${conf_src}) diff --git a/include/shared/fwcmd.h b/include/shared/fwcmd.h index 2bf2d74..9443c80 100644 --- a/include/shared/fwcmd.h +++ b/include/shared/fwcmd.h @@ -187,7 +187,7 @@ struct carl9170_wol_cmd { u8 mac[6]; u8 bssid[6]; __le32 null_interval; - __le32 free_for_use2; + __le32 free_for_use2; __le32 mask; u8 pattern[32]; } __packed; diff --git a/include/shared/version.h b/include/shared/version.h index 6470377..e651db8 100644 --- a/include/shared/version.h +++ b/include/shared/version.h @@ -1,7 +1,7 @@ #ifndef __CARL9170_SHARED_VERSION_H #define __CARL9170_SHARED_VERSION_H #define CARL9170FW_VERSION_YEAR 11 -#define CARL9170FW_VERSION_MONTH 6 -#define CARL9170FW_VERSION_DAY 30 +#define CARL9170FW_VERSION_MONTH 8 +#define CARL9170FW_VERSION_DAY 15 #define CARL9170FW_VERSION_GIT "1.9.4" #endif /* __CARL9170_SHARED_VERSION_H */ -- 2.31.1