diff options
author | André Carvalho de Matos <andre.carvalho.matos@stericsson.com> | 2010-11-01 07:52:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-03 21:50:03 -0400 |
commit | f2527ec436fd675f08a8e7434f6e940688cb96d0 (patch) | |
tree | f3c723c652b58cd4862d635e598a4ad88eedec64 /net/caif/cfcnfg.c | |
parent | 6cc0e949afe757d240fba4ad1839a27f66c3bd72 (diff) |
caif: Bugfix for socket priority, bindtodev and dbg channel.
Changes:
o Bugfix: SO_PRIORITY for SOL_SOCKET could not be handled
in caif's setsockopt, using the struct sock attribute priority instead.
o Bugfix: SO_BINDTODEVICE for SOL_SOCKET could not be handled
in caif's setsockopt, using the struct sock attribute ifindex instead.
o Wrong assert statement for RFM layer segmentation.
o CAIF Debug channels was not working over SPI, caif_payload_info
containing padding info must be initialized.
o Check on pointer before dereferencing when unregister dev in caif_dev.c
Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif/cfcnfg.c')
-rw-r--r-- | net/caif/cfcnfg.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/net/caif/cfcnfg.c b/net/caif/cfcnfg.c index 41adafd18914..21ede141018a 100644 --- a/net/caif/cfcnfg.c +++ b/net/caif/cfcnfg.c | |||
@@ -173,18 +173,15 @@ static struct cfcnfg_phyinfo *cfcnfg_get_phyinfo(struct cfcnfg *cnfg, | |||
173 | return NULL; | 173 | return NULL; |
174 | } | 174 | } |
175 | 175 | ||
176 | int cfcnfg_get_named(struct cfcnfg *cnfg, char *name) | 176 | |
177 | int cfcnfg_get_id_from_ifi(struct cfcnfg *cnfg, int ifi) | ||
177 | { | 178 | { |
178 | int i; | 179 | int i; |
179 | 180 | for (i = 0; i < MAX_PHY_LAYERS; i++) | |
180 | /* Try to match with specified name */ | 181 | if (cnfg->phy_layers[i].frm_layer != NULL && |
181 | for (i = 0; i < MAX_PHY_LAYERS; i++) { | 182 | cnfg->phy_layers[i].ifindex == ifi) |
182 | if (cnfg->phy_layers[i].frm_layer != NULL | 183 | return i; |
183 | && strcmp(cnfg->phy_layers[i].phy_layer->name, | 184 | return -ENODEV; |
184 | name) == 0) | ||
185 | return cnfg->phy_layers[i].frm_layer->id; | ||
186 | } | ||
187 | return 0; | ||
188 | } | 185 | } |
189 | 186 | ||
190 | int cfcnfg_disconn_adapt_layer(struct cfcnfg *cnfg, struct cflayer *adap_layer) | 187 | int cfcnfg_disconn_adapt_layer(struct cfcnfg *cnfg, struct cflayer *adap_layer) |