iwmc3200wifi: fix fragmentation threshold setting
Subsystems (2)
PATCH 1/3 iwmc3200wifi: fix fragmentation threshold setting
From: Samuel Ortiz <[email protected]>
We were sending the fragmentation threshold value to the wrong table, causing an LMAC assert when setting it from wext.
--- drivers/net/wireless/iwmc3200wifi/cfg80211.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/iwmc3200wifi/cfg80211.c +1 -1
@@ -268,7 +268,7 @@ static int iwm_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) iwm->conf.frag_threshold = wiphy->frag_threshold; - ret =iwm_umac_set_config_fix (iwm,UMAC_PARAM_TBL_CFG_FIX , + ret =iwm_umac_set_config_fix (iwm,UMAC_PARAM_TBL_FA_CFG_FIX ,CFG_FRAG_THRESHOLD , iwm->conf.frag_threshold);if (ret <0 )
Signature · 1 line
1.6.0.4
PATCH 2/3 iwmc3200wifi: shrink calibration lmac name
From: Samuel Ortiz <[email protected]>
Firmware names can not be longer than 30 characters, and iwmc3200wifi-lmac-calib-sdio.bin is too long. Renaming it to iwmc3200wifi-calib-sdio.bin.
--- drivers/net/wireless/iwmc3200wifi/sdio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/iwmc3200wifi/sdio.c +1 -1
@@ -395,7 +395,7 @@ static struct iwm_if_ops if_sdio_ops = { .debugfs_init = if_sdio_debugfs_init, .debugfs_exit = if_sdio_debugfs_exit, .umac_name = "iwmc3200wifi-umac-sdio.bin", - .calib_lmac_name = "iwmc3200wifi-lmac-calib-sdio.bin", + .calib_lmac_name = "iwmc3200wifi-calib-sdio.bin", .lmac_name = "iwmc3200wifi-lmac-sdio.bin", };
Signature · 1 line
1.6.0.4
PATCH 3/3 iwmc3200wifi: fix link error when CFG80211 is not selected
The patch makes iwmc3200wifi select CFG80211 instead of LIB80211. This fixed module link error reported by Randy Dunlap <[email protected]> when compiling iwmc3200wifi without cfg80211 selected. WIRELESS_EXT is also selected by iwmc3200wifi.
--- drivers/net/wireless/iwmc3200wifi/Kconfig | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/net/wireless/iwmc3200wifi/Kconfig +2 -1
@@ -1,7 +1,8 @@ config IWM tristate "Intel Wireless Multicomm 3200 WiFi driver" depends on MMC && WLAN_80211 && EXPERIMENTAL - select LIB80211 + select WIRELESS_EXT + select CFG80211 select FW_LOADER select RFKILL
Signature · 1 line
1.6.0.4
Re: [PATCH 3/3] iwmc3200wifi: fix link error when CFG80211 is not selected
From: Zhu Yi <[email protected]>
Date: Tue, 26 May 2009 11:10:48 +0800
Quoted 6 lines
The patch makes iwmc3200wifi select CFG80211 instead of LIB80211. This fixed module link error reported by Randy Dunlap <[email protected]> when compiling iwmc3200wifi without cfg80211 selected.
WIRELESS_EXTis also selected by iwmc3200wifi.Signed-off-by Zhu Yi <[email protected]>
I'm applying this directly so that the -next build failure gets fixed.
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
In reply to Zhu YiHi guys,
Quoted 3 lines
Firmware names can not be longer than 30 characters, and iwmc3200wifi-lmac-calib-sdio.bin is too long. Renaming it to iwmc3200wifi-calib-sdio.bin.
hold on with this one. This limit should _NOT_ exist. Is this an issue in the driver model?
Regards
Marcel
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
From: Marcel Holtmann <[email protected]>
Date: Tue, 26 May 2009 06:43:11 +0200
Quoted 8 lines
Hi guys,
Quoted 3 lines
Firmware names can not be longer than 30 characters, and iwmc3200wifi-lmac-calib-sdio.bin is too long. Renaming it to iwmc3200wifi-calib-sdio.bin.
hold on with this one. This limit should _NOT_ exist. Is this an issue in the driver model?
linux/firmware.h:FIRMWARE_NAME_MAX == 30 drivers/base/firmware_class.c:struct firmware_priv{ char fw_id[FIRMWARE_NAME_MAX]; ... };
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
In reply to Marcel HoltmannQuoted 8 lines · Marcel Holtmann
Hi guys,
Quoted 3 lines
Firmware names can not be longer than 30 characters, and iwmc3200wifi-lmac-calib-sdio.bin is too long. Renaming it to iwmc3200wifi-calib-sdio.bin.
hold on with this one. This limit should _NOT_ exist. Is this an issue in the driver model?
It should be FW_LOADER framework implementation limitation.
request_firmware()
-> fw_setup_device()
-> fw_register_device()
fw_register_device()
{
...
strlcpy(fw_priv->fw_id, fw_name, FIRMWARE_NAME_MAX);
...
}FIRMWARE_NAME_MAX is defined 30 at this time.
Thanks,
-yi
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
Hi Yi,
Quoted 13 lines
Quoted 6 lines
Quoted 3 lines
Firmware names can not be longer than 30 characters, and iwmc3200wifi-lmac-calib-sdio.bin is too long. Renaming it to iwmc3200wifi-calib-sdio.bin.
hold on with this one. This limit should _NOT_ exist. Is this an issue in the driver model?
It should be
FW_LOADERframework implementation limitation.
request_firmware()
->fw_setup_device()-> fw_register_device()
Quoted 8 lines
fw_register_device(){ ... strlcpy(fw_priv->fw_id, fw_name, FIRMWARE_NAME_MAX); ... }
FIRMWARE_NAME_MAXis defined 30 at this time.
I think we need to fix this. Especially since all the other name length limits in the driver model are gone.
Regards
Marcel
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
Quoted 2 lines · Marcel Holtmann
I think we need to fix this. Especially since all the other name length limits in the driver model are gone.
Yeah, but at the same time the driver should get a shorter and actually pronouncable name. Why not just iwl3200 to follow the model set by the other drivers?
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
Hi Christoph,
Quoted 6 lines
Quoted 2 lines
I think we need to fix this. Especially since all the other name length limits in the driver model are gone.
Yeah, but at the same time the driver should get a shorter and actually pronouncable name. Why not just iwl3200 to follow the model set by the other drivers?
that beast is a multi-comm device with WiFi, WiMAX, Bluetooth and GPS. I think you can guess which pieces are coming next.
Regards
Marcel
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
In reply to Christoph HellwigQuoted 7 lines · Christoph Hellwig
Quoted 2 lines · Marcel Holtmann
I think we need to fix this. Especially since all the other name length limits in the driver model are gone.
Yeah, but at the same time the driver should get a shorter and actually pronouncable name. Why not just iwl3200 to follow the model set by the other drivers?
There are totally 3 firmware images required by the iwmc3200wifi driver:
one used for calibration, one upper mac (UMAC) and a lower mac (LMAC). This iwmc3200 is a multicomm device, WiFi is only one of its functions. Finally we have to add the "-sdio" suffix to distinguish with other form factors (e.g. USB, mini PCIe, etc).
Thanks,
-yi
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
In reply to Marcel HoltmannQuoted 4 lines · Marcel Holtmann
Quoted 1 line
FIRMWARE_NAME_MAXis defined 30 at this time.I think we need to fix this. Especially since all the other name length limits in the driver model are gone.
I agree. Should we fix this by simply increasing FIRMWARE_NAME_MAX to some acceptable length (what should it be? btw) or there are other better ideas?
Anyway, I think whatever how we change FW_LOADER, this patch should still go. Because the "lmac" string doesn't make any sense in this file name due to calibration is only done in LMAC.
Thanks,
-yi
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
Hi Yi,
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
FIRMWARE_NAME_MAXis defined 30 at this time.I think we need to fix this. Especially since all the other name length limits in the driver model are gone.
I agree. Should we fix this by simply increasing
FIRMWARE_NAME_MAXto some acceptable length (what should it be? btw) or there are other better ideas?
I think just increasing the length of the static array is bad. Can we just not allocated the needed length for the firmware filename?
Quoted 3 lines
Anyway, I think whatever how we change
FW_LOADER, this patch should still go. Because the "lmac" string doesn't make any sense in this file name due to calibration is only done in LMAC.
If you think that the lmac string is pointless anyway, then that is fine. Changing the name, because of a FW_LOADER limitation should not be done of course.
Regards
Marcel
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
Hi Marcel,
Quoted 11 lines · Marcel Holtmann
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
FIRMWARE_NAME_MAXis defined 30 at this time.I think we need to fix this. Especially since all the other name length limits in the driver model are gone.
I agree. Should we fix this by simply increasing
FIRMWARE_NAME_MAXto some acceptable length (what should it be? btw) or there are other better ideas?I think just increasing the length of the static array is bad. Can we just not allocated the needed length for the firmware filename?
I think we can, assuming all firmware name strings passed through request_firmware() are \0 terminated. Based on that assumption, this is what I propose:
--
drivers/base/firmware_class.c | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-)
drivers/base/firmware_class.c +14 -3
@@ -40,7 +40,7 @@ static int loading_timeout = 60; /* In seconds */static DEFINE_MUTEX (fw_lock);struct firmware_priv { -char fw_id[FIRMWARE_NAME_MAX ]; +char *fw_id;struct completion completion;struct bin_attribute attr_data;struct firmware *fw;
@@ -278,6 +278,7 @@ static void fw_dev_release(struct device *dev) {struct firmware_priv *fw_priv =dev_get_drvdata (dev); +kfree (fw_priv->fw_id);kfree (fw_priv);kfree (dev);
@@ -309,7 +310,14 @@ static int fw_register_device(struct device **dev_p, const char *fw_name,init_completion (&fw_priv->completion); fw_priv->attr_data = firmware_attr_data_tmpl; -strlcpy (fw_priv->fw_id, fw_name,FIRMWARE_NAME_MAX ); + fw_priv->fw_id =kzalloc (strlen (fw_name) +1 ,GFP_KERNEL ); +if (!fw_priv->fw_id) { +dev_err (device,"%s: Firmware name allocation failed\n" , + __func__); + retval = -ENOMEM ; + goto error_kfree; + } +strcpy (fw_priv->fw_id, fw_name); fw_priv->timeout.function = firmware_class_timeout; fw_priv->timeout.data = (u_long ) fw_priv;
@@ -323,11 +331,14 @@ static int fw_register_device(struct device **dev_p, const char *fw_name, retval =device_register (f_dev);if (retval) {dev_err (device,"%s: device_register failed\n" , __func__); - goto error_kfree; + goto error_kfree_fw_id; } *dev_p = f_dev;return 0 ; +error_kfree_fw_id: +kfree (fw_priv->fw_id); + error_kfree:kfree (fw_priv);kfree (f_dev);
Signature · 13 lines
Intel Open Source Technology Centre http://oss.intel.com/ --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
Quoted 2 lines · Samuel Ortiz
-
strlcpy(fw_priv->fw_id, fw_name, FIRMWARE_NAME_MAX);
+fw_priv->fw_id=kzalloc(strlen(fw_name) + 1, GFP_KERNEL);
kstrdup()?
Kay
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
Quoted 5 lines · Kay Sievers
Quoted 2 lines · Samuel Ortiz
-
strlcpy(fw_priv->fw_id, fw_name, FIRMWARE_NAME_MAX);
+fw_priv->fw_id=kzalloc(strlen(fw_name) + 1, GFP_KERNEL);
kstrdup()?
Indeed, thanks.
I'm offloading this thread to lkml, as I dont want to continue polluting the linux-wireless one with unrelated matters.
Cheers,
Samuel.
Signature · 13 lines
Intel Open Source Technology Centre http://oss.intel.com/ --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
In reply to Zhu YiQuoted 8 lines · Zhu Yi
From: Samuel Ortiz <[email protected]>
Firmware names can not be longer than 30 characters, and iwmc3200wifi-lmac-calib-sdio.bin is too long. Renaming it to iwmc3200wifi-calib-sdio.bin.
Signed-off-by Samuel Ortiz <[email protected]>Signed-off-by Zhu Yi <[email protected]>
Is this still wanted?
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
Quoted 11 lines · John W. Linville
Quoted 8 lines · Zhu Yi
From: Samuel Ortiz <[email protected]>
Firmware names can not be longer than 30 characters, and iwmc3200wifi-lmac-calib-sdio.bin is too long. Renaming it to iwmc3200wifi-calib-sdio.bin.
Signed-off-by Samuel Ortiz <[email protected]>Signed-off-by Zhu Yi <[email protected]>Is this still wanted?
Yes, it is still wanted, but probably with a better description:
From: Samuel Ortiz <[email protected]>
iwmc3200wifi: trim down calibration firmware name
The patch trims down iwmc3200wifi calibration firmware name from iwmc3200wifi-lmac-calib-sdio.bin to iwmc3200wifi-calib-sdio.bin. We can shorten the firmware name because all calibration is done by LMAC.
Thanks,
-yi
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
Quoted 8 lines · Yi
Quoted 7 lines · John W. Linville
Quoted 6 lines · Zhu Yi
From: Samuel Ortiz <[email protected]>
Firmware names can not be longer than 30 characters, and iwmc3200wifi-lmac-calib-sdio.bin is too long. Renaming it to iwmc3200wifi-calib-sdio.bin.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Signed-off-by Samuel Ortiz <[email protected]>Signed-off-by Zhu Yi <[email protected]>Is this still wanted?
Yes, it is still wanted, but probably with a better description:
Sorry John, an obvious lack of communication on our part here :/ I agree with Yi about the fact that our calibration firmware name is redundant, so in that regard it does make sense to push this patch now. Sorry again for the confusion...
Cheers,
Samuel.
Quoted 17 lines
From: Samuel Ortiz <[email protected]>
iwmc3200wifi: trim down calibration firmware name
The patch trims down iwmc3200wifi calibration firmware name from iwmc3200wifi-lmac-calib-sdio.bin to iwmc3200wifi-calib-sdio.bin. We can shorten the firmware name because all calibration is done by LMAC.
Signed-off-by Samuel Ortiz <[email protected]>Signed-off-by Zhu Yi <[email protected]>Thanks,
-yi
Signature · 13 lines
Intel Open Source Technology Centre http://oss.intel.com/ --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
In reply to John W. LinvilleHi John,
Quoted 11 lines · John W. Linville
Quoted 8 lines · Zhu Yi
From: Samuel Ortiz <[email protected]>
Firmware names can not be longer than 30 characters, and iwmc3200wifi-lmac-calib-sdio.bin is too long. Renaming it to iwmc3200wifi-calib-sdio.bin.
Signed-off-by Samuel Ortiz <[email protected]>Signed-off-by Zhu Yi <[email protected]>Is this still wanted?
I havent heard anything from Greg regarding my firmware name length patch set. I'll ping him and check if the patches are queued for rc1 inclusion. Meanwhile I think you can leave this one aside for now, thanks.
Cheers,
Samuel.
Quoted 3 lines
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.
Signature · 13 lines
Intel Open Source Technology Centre http://oss.intel.com/ --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
Hi Samuel,
Quoted 11 lines
Quoted 8 lines
Quoted 6 lines
Firmware names can not be longer than 30 characters, and iwmc3200wifi-lmac-calib-sdio.bin is too long. Renaming it to iwmc3200wifi-calib-sdio.bin.
Signed-off-by Samuel Ortiz <[email protected]>Signed-off-by Zhu Yi <[email protected]>Is this still wanted?
I havent heard anything from Greg regarding my firmware name length patch set. I'll ping him and check if the patches are queued for rc1 inclusion. Meanwhile I think you can leave this one aside for now, thanks.
actually we have to get the firmware straight before 2.6.31-rc1 hits the streets. So at some point we have to make up our mind ;)
Either way is fine btw. and fixing the firmware name length limitation is also the right thing to do. Cutting the name because of a bogus legacy limitation was just the wrong fix here ;)
Regards
Marcel
Re: [PATCH 2/3] iwmc3200wifi: shrink calibration lmac name
Quoted 9 lines · Marcel Holtmann
Hi Samuel,
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Firmware names can not be longer than 30 characters, and iwmc3200wifi-lmac-calib-sdio.bin is too long. Renaming it to iwmc3200wifi-calib-sdio.bin.
Signed-off-by Samuel Ortiz <[email protected]>Signed-off-by Zhu Yi <[email protected]>
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Is this still wanted?
I havent heard anything from Greg regarding my firmware name length patch set. I'll ping him and check if the patches are queued for rc1 inclusion. Meanwhile I think you can leave this one aside for now, thanks.
actually we have to get the firmware straight before 2.6.31-rc1 hits the streets. So at some point we have to make up our mind ;)
Yep, we lacked some synchronization with Yi.
Quoted 2 lines
Either way is fine btw. and fixing the firmware name length limitation is also the right thing to do.
Yes, that needed a fix, regardless of our local iwmc issues. I also agree with Yi that our calibration firmware name is too long/verbose and needs to be shortened. So both fixes should go in I think.
Quoted 2 lines
Cutting the name because of a bogus
legacy limitation was just the wrong fix here ;)
I agree, I was just too lazy to fix the firmware class stuff at first :/
Cheers,
Samuel.
Quoted 5 lines
Regards
Marcel
Signature · 13 lines
Intel Open Source Technology Centre http://oss.intel.com/ --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.