From: Joe Perches <joe@perches.com>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
chaoming_li@realsil.com.cn
Subject: Re: [PATCH NEXT V2 01/15] rtlwifi: rtl8723ae: Add new driver - Part 1
Date: Tue, 18 Sep 2012 20:40:49 -0700 [thread overview]
Message-ID: <1348026049.11276.17.camel@joe2Laptop> (raw)
In-Reply-To: <1348019243-18016-2-git-send-email-Larry.Finger@lwfinger.net>
On Tue, 2012-09-18 at 20:47 -0500, Larry Finger wrote:
> This patch is part 1 of the addition of files for a new driver to handle
> the Realtek RTL8723AE wireless device.
[]
> diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/def.h b/drivers/net/wireless/rtlwifi/rtl8723ae/def.h
[]
> +#define GET_CVID_MANUFACTUER(version) ((version) & MANUFACTUER_MASK)
spelling manufacturer (here and other uses)
> +#define GET_CVID_ROM_VERSION(version) ((version) & ROM_VERSION_MASK)
> +#define GET_CVID_CUT_VERSION(version) ((version) & CUT_VERSION_MASK)
> +
> +#define IS_81XXC(version) ((GET_CVID_IC_TYPE(version) == 0) ?\
> + true : false)
Don't need ?:
> +#define IS_8723_SERIES(version) \
> + ((GET_CVID_IC_TYPE(version) == CHIP_8723) ? true : false)
here too etc...
> diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/dm.c b/drivers/net/wireless/rtlwifi/rtl8723ae/dm.c
[]
> +static u8 rtl8723ae_dm_initial_gain_min_pwdb(struct ieee80211_hw *hw)
> +{
> + struct rtl_priv *rtlpriv = rtl_priv(hw);
> + struct dig_t *dm_digtable = &rtlpriv->dm_digtable;
> + long rssi_val_min = 0;
> +
> + if ((dm_digtable->curmultista_connectstate == DIG_MULTISTA_CONNECT) &&
> + (dm_digtable->cursta_connectstate == DIG_STA_CONNECT)) {
> + if (rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb != 0)
> + rssi_val_min =
> + (rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb >
when variable names exceed a certain length, keeping things readable
within 80 columns becomes impossible.
> + rtlpriv->dm.undecorated_smoothed_pwdb) ?
> + rtlpriv->dm.undecorated_smoothed_pwdb :
> + rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb;
if (rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb != 0)
rssi_val_min = min(rtlpriv->dm.entry_min_undecoratedsmoothed_pwdb,
rtlpriv->dm.undecorated_smoothed_pwdb);
[]
> +static void rtl92c_dm_ctrl_initgain_by_fa(struct ieee80211_hw *hw)
> +{
> + struct rtl_priv *rtlpriv = rtl_priv(hw);
> + struct dig_t *dm_digtable = &rtlpriv->dm_digtable;
> + u8 value_igi = dm_digtable->cur_igvalue;
> +
> + if (rtlpriv->falsealm_cnt.cnt_all < DM_DIG_FA_TH0)
> + value_igi--;
> + else if (rtlpriv->falsealm_cnt.cnt_all < DM_DIG_FA_TH1)
> + value_igi += 0;
> + else if (rtlpriv->falsealm_cnt.cnt_all < DM_DIG_FA_TH2)
> + value_igi++;
> + else if (rtlpriv->falsealm_cnt.cnt_all >= DM_DIG_FA_TH2)
> + value_igi += 2;
A style error, just an else would be fine.
> + if (value_igi > DM_DIG_FA_UPPER)
> + value_igi = DM_DIG_FA_UPPER;
> + else if (value_igi < DM_DIG_FA_LOWER)
> + value_igi = DM_DIG_FA_LOWER;
clamp
I think this is pretty difficult code to read, so I stopped.
next prev parent reply other threads:[~2012-09-19 3:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-19 1:47 [PATCH NEXT V2 00/15] Add new driver for RTL8723AE Larry Finger
2012-09-19 1:47 ` [PATCH NEXT V2 01/15] rtlwifi: rtl8723ae: Add new driver - Part 1 Larry Finger
2012-09-19 3:40 ` Joe Perches [this message]
2012-09-19 1:47 ` [PATCH NEXT V2 02/15] rtlwifi: rtl8723ae: Add new driver - Part 2 Larry Finger
2012-09-19 1:47 ` [PATCH NEXT V2 03/15] rtlwifi: rtl8723ae: Add new driver - Part 3 Larry Finger
2012-09-19 1:47 ` [PATCH NEXT V2 04/15] rtlwifi: rtl8723ae: Add new driver - Part 4 Larry Finger
2012-09-19 1:47 ` [PATCH NEXT V2 05/15] rtlwifi: rtl8723ae: Add new driver - Part 5 Larry Finger
2012-09-19 1:47 ` [PATCH NEXT V2 06/15] rtlwifi: rtl8723ae: Add new driver - Part 6 Larry Finger
2012-09-19 1:47 ` [PATCH NEXT V2 07/15] rtlwifi: rtl8723ae: Add new driver - Part 7 Larry Finger
2012-09-19 1:47 ` [PATCH NEXT V2 08/15] rtlwifi: rtl8723ae: Add new driver - Part 8 Larry Finger
2012-09-19 1:47 ` [PATCH NEXT V2 09/15] rtlwifi: rtl8723ae: Add new driver - Part 9 Larry Finger
2012-09-19 1:47 ` [PATCH NEXT V2 10/15] rtlwifi: rtl8723ae: Add new driver - Part 10 Larry Finger
2012-09-19 1:47 ` [PATCH NEXT V2 11/15] rtlwifi: rtl8723ae: Add new driver - Part 11 Larry Finger
2012-09-19 1:47 ` [PATCH NEXT V2 12/15] rtlwifi: rtl8723ae: Add new driver - Part 12 Larry Finger
2012-09-19 1:47 ` [PATCH NEXT V2 13/15] rtlwifi: rtl8723ae: Add new driver - Part 13 Larry Finger
2012-09-19 1:47 ` [PATCH NEXT V2 14/15] rtlwifi: Modify files for addition of rtl8723ae Larry Finger
2012-09-19 1:47 ` [PATCH NEXT V2 15/15] rtlwifi: rtl8192ce: rtl8192cu: rtl8192se: rtl81723ae: Turn on building of the new driver Larry Finger
2012-09-19 15:48 ` [PATCH NEXT V2 00/15] Add new driver for RTL8723AE Larry Finger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1348026049.11276.17.camel@joe2Laptop \
--to=joe@perches.com \
--cc=Larry.Finger@lwfinger.net \
--cc=chaoming_li@realsil.com.cn \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox